From 1ce635dbcf1b134cb1e6039737fef87a6712c12d Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Sat, 10 Apr 2021 21:22:19 +0200 Subject: [PATCH] Add a new ClickBox and don't add 10 to the x and y coordinates. --- common/src/main/kotlin/fr/username404/snowygui/ClickGui.kt | 3 ++- common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt | 2 +- common/src/main/resources/assets/snowygui/lang/en_us.json | 3 ++- common/src/main/resources/assets/snowygui/lang/fr_fr.json | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/ClickGui.kt b/common/src/main/kotlin/fr/username404/snowygui/ClickGui.kt index 9ec40c8..509e8b4 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/ClickGui.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/ClickGui.kt @@ -7,7 +7,8 @@ import net.minecraft.network.chat.TranslatableComponent class ClickGui: SnowyScreen() { override val components: MutableSet = mutableSetOf( - ClickBox(4.0, 4.0, TranslatableComponent("snowy.clickbox.misc")) + ClickBox(4.0, 4.0, TranslatableComponent("snowy.clickbox.misc")), + ClickBox(90.0, 4.0, TranslatableComponent("snowy.clickbox.rendering")) // TODO Add components to the ClickGui ) } \ No newline at end of file diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt index e84b09c..b627a19 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/ClickBox.kt @@ -7,7 +7,7 @@ import net.minecraft.client.Minecraft import net.minecraft.network.chat.TranslatableComponent import org.lwjgl.opengl.GL20 -class ClickBox(x: Double, y: Double, private val name: TranslatableComponent? = null): ColoredElement(x + 10, y + 10, 80, 10, 0x6C9E9D) { +class ClickBox(x: Double, y: Double, private val name: TranslatableComponent? = null): ColoredElement(x, y, 80, 10, 0x6C9E9D) { var opacity = 0.5F override fun render(poseStack: PoseStack?) { RenderSystem.disableTexture() diff --git a/common/src/main/resources/assets/snowygui/lang/en_us.json b/common/src/main/resources/assets/snowygui/lang/en_us.json index abc5a6d..2c01491 100644 --- a/common/src/main/resources/assets/snowygui/lang/en_us.json +++ b/common/src/main/resources/assets/snowygui/lang/en_us.json @@ -4,5 +4,6 @@ "category.snowy.keycategory": "SnowyGUI", "key.snowy.opengui": "Open the snowy gui", "key.snowy.configkey": "Open the snowy configuration screen", - "snowy.clickbox.misc": "Misc" + "snowy.clickbox.misc": "Misc", + "snowy.clickbox.rendering": "Rendering" } \ No newline at end of file diff --git a/common/src/main/resources/assets/snowygui/lang/fr_fr.json b/common/src/main/resources/assets/snowygui/lang/fr_fr.json index b6a15a9..14293fc 100644 --- a/common/src/main/resources/assets/snowygui/lang/fr_fr.json +++ b/common/src/main/resources/assets/snowygui/lang/fr_fr.json @@ -4,5 +4,6 @@ "category.snowy.keycategory": "SnowyGUI", "key.snowy.opengui": "Ouvrir l'interface de snowy", "key.snowy.configkey": "Ouvrir l'écran de configuration de snowy", - "snowy.clickbox.misc": "Divers" + "snowy.clickbox.misc": "Divers", + "snowy.clickbox.rendering": "Rendu" } \ No newline at end of file