diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-08-11 11:15:15 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-08-11 11:15:15 +0200 |
commit | 35621c1e68ca0f4803a8441585dc31aa6f620daa (patch) | |
tree | 05d011b1428895d7e81aa15ada905c8ecf527ab9 /src/main/java/at | |
parent | 940f557330e3696391a5fb2e59d67dddc1d288fb (diff) | |
download | skyhanni-35621c1e68ca0f4803a8441585dc31aa6f620daa.tar.gz skyhanni-35621c1e68ca0f4803a8441585dc31aa6f620daa.tar.bz2 skyhanni-35621c1e68ca0f4803a8441585dc31aa6f620daa.zip |
formatting
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt b/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt index e0e8c28a5..db6ca3c30 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt @@ -40,7 +40,7 @@ import java.io.IOException class GuiPositionEditor( private val positions: List<Position>, private val border: Int, - private val oldScreen: GuiContainer? = null + private val oldScreen: GuiContainer? = null, ) : GuiScreen() { private var grabbedX = 0 @@ -86,18 +86,14 @@ class GuiPositionEditor( // When the mouse isn't currently hovering over a gui element if (displayPos == -1) { GuiRenderUtils.drawStringCentered( - "§eTo edit hidden GUI elements set a key in /sh edit", getScaledWidth() / 2, - 20 - + 20, ) GuiRenderUtils.drawStringCentered( - "§ethen click that key while the GUI element is visible", getScaledWidth() / 2, - 32 - + 32, ) return } @@ -110,7 +106,7 @@ class GuiPositionEditor( GuiRenderUtils.drawStringCentered( "§aRight-Click to open associated config options", getScaledWidth() / 2, - 38 + 38, ) } @@ -136,16 +132,13 @@ class GuiPositionEditor( drawRect(x - border, y - border, x + elementWidth + border * 2, y + elementHeight + border * 2, -0x7fbfbfc0) if (GuiRenderUtils.isPointInRect( - mouseX, mouseY, x - border, y - border, elementWidth + border * 2, - elementHeight + border * 2 - + elementHeight + border * 2, ) - ) { hoveredPos = index } @@ -175,7 +168,7 @@ class GuiPositionEditor( x - border, y - border, elementWidth + border * 2, - elementHeight + border * 2 + elementHeight + border * 2, ) if (!isHovered) continue if (mouseButton == 1) { @@ -251,7 +244,7 @@ class GuiPositionEditor( GuiRenderUtils.isPointInRect( mx, my, it.getAbsX() - border, it.getAbsY() - border, - size.x + border * 2, size.y + border * 2 + size.x + border * 2, size.y + border * 2, ) } ?: return if (mw < 0) |