diff options
author | Brady <thatgravyboat@gmail.com> | 2024-07-28 08:04:52 -0230 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-28 12:34:52 +0200 |
commit | a41214df4d112444eca29fe60684cc051382a33c (patch) | |
tree | 2de4a300be9592090aacf3615fd9f5881a77e9f8 /src/main/java/at/hannibal2/skyhanni/features/gui | |
parent | 32d3a6ae845475284cc5f72dac5649d732c223b5 (diff) | |
download | skyhanni-a41214df4d112444eca29fe60684cc051382a33c.tar.gz skyhanni-a41214df4d112444eca29fe60684cc051382a33c.tar.bz2 skyhanni-a41214df4d112444eca29fe60684cc051382a33c.zip |
Improvement: Apply border radius to scoreboard texture (#2228)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/gui')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt index 3d4e6daad..ebbb7fa30 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/RenderBackground.kt @@ -7,7 +7,6 @@ import at.hannibal2.skyhanni.data.GuiEditManager.getAbsY import at.hannibal2.skyhanni.data.GuiEditManager.getDummySize import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.RenderUtils -import io.github.moulberry.notenoughupdates.util.Utils import net.minecraft.client.Minecraft import net.minecraft.client.gui.ScaledResolution import net.minecraft.client.renderer.GlStateManager @@ -49,12 +48,13 @@ class RenderBackground { val textureLocation = ResourceLocation("skyhanni", "scoreboard.png") Minecraft.getMinecraft().textureManager.bindTexture(textureLocation) - Utils.drawTexturedRect( - (x - border).toFloat(), - (y - border).toFloat(), - (elementWidth + border * 3).toFloat(), - (elementHeight + border * 2).toFloat(), - GL11.GL_NEAREST + RenderUtils.drawRoundTexturedRect( + x - border, + y - border, + elementWidth + border * 3, + elementHeight + border * 2, + GL11.GL_NEAREST, + backgroundConfig.roundedCornerSmoothness, ) } else { RenderUtils.drawRoundRect( @@ -63,7 +63,7 @@ class RenderBackground { elementWidth + border * 3, elementHeight + border * 2, backgroundConfig.color.toChromaColor().rgb, - backgroundConfig.roundedCornerSmoothness + backgroundConfig.roundedCornerSmoothness, ) } if (outlineConfig.enabled) { @@ -76,7 +76,7 @@ class RenderBackground { outlineConfig.colorBottom.toChromaColor().rgb, outlineConfig.thickness, backgroundConfig.roundedCornerSmoothness, - outlineConfig.blur + outlineConfig.blur, ) } } @@ -133,7 +133,7 @@ class RenderBackground { newX, newY, position.getScale(), - position.isCenter + position.isCenter, ) } } |