aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-04-17 18:14:16 +0200
committerGitHub <noreply@github.com>2024-04-17 18:14:16 +0200
commit734fdf613cc660430447adbd3191b5bc7c1817de (patch)
tree28d6f09db94148a2ec98dd4c9189bef0290ad5b1 /src/main/java/at/hannibal2/skyhanni/utils
parent6c968778dab9c04b0ff4fec7b4eb61f36e23660d (diff)
downloadskyhanni-734fdf613cc660430447adbd3191b5bc7c1817de.tar.gz
skyhanni-734fdf613cc660430447adbd3191b5bc7c1817de.tar.bz2
skyhanni-734fdf613cc660430447adbd3191b5bc7c1817de.zip
Feature: Cold Overlay (#1438)
Co-authored-by: martimavocado <39881008+martimavocado@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: Empa <42304516+ItsEmpa@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index 6aa9c5479..3e8472d63 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -439,7 +439,7 @@ object RenderUtils {
string: String?,
offsetX: Int = 0,
offsetY: Int = 0,
- alignmentEnum: HorizontalAlignment
+ alignmentEnum: HorizontalAlignment,
): Int {
val display = "§f$string"
GlStateManager.pushMatrix()
@@ -482,7 +482,7 @@ object RenderUtils {
fun Position.renderStringsAlignedWidth(
list: List<Pair<String, HorizontalAlignment>>,
extraSpace: Int = 0,
- posLabel: String
+ posLabel: String,
) {
if (list.isEmpty()) return
@@ -558,7 +558,7 @@ object RenderUtils {
*/
fun Position.renderSingleLineWithItems(
list: List<Any?>,
- posLabel: String
+ posLabel: String,
) {
if (list.isEmpty()) return
renderRenderables(
@@ -590,7 +590,7 @@ object RenderUtils {
fun MutableList<Any>.addItemIcon(
item: ItemStack,
highlight: Boolean = false,
- scale: Double = NEUItems.itemFontSize
+ scale: Double = NEUItems.itemFontSize,
) {
try {
if (highlight) {
@@ -1187,7 +1187,7 @@ object RenderUtils {
middlePoint: LorenzVec,
sidePoint1: LorenzVec,
sidePoint2: LorenzVec,
- c: Color
+ c: Color,
) {
GlStateManager.color(c.red / 255f, c.green / 255f, c.blue / 255f, c.alpha / 255f)
worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION)
@@ -1201,7 +1201,7 @@ object RenderUtils {
companion object {
inline fun draw3D(
partialTicks: Float = 0F,
- crossinline quads: QuadDrawer.() -> Unit
+ crossinline quads: QuadDrawer.() -> Unit,
) {
GlStateManager.enableBlend()
@@ -1457,4 +1457,11 @@ object RenderUtils {
ShaderManager.disableShader()
GlStateManager.popMatrix()
}
+
+ // TODO move off of neu function
+ fun drawTexturedRect(x: Float, y: Float) {
+ with(ScaledResolution(Minecraft.getMinecraft())) {
+ Utils.drawTexturedRect(x, y, scaledWidth.toFloat(), scaledHeight.toFloat(), GL11.GL_NEAREST)
+ }
+ }
}