Add a new ClickBox and don't add 10 to the x and y coordinates.

This commit is contained in:
Username404-59 2021-04-10 21:22:19 +02:00
parent 0bbf7a00ff
commit 1ce635dbcf
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
4 changed files with 7 additions and 4 deletions

View File

@ -7,7 +7,8 @@ import net.minecraft.network.chat.TranslatableComponent
class ClickGui: SnowyScreen() {
override val components: MutableSet<Element> = 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
)
}

View File

@ -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()

View File

@ -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"
}

View File

@ -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"
}