Add a new ClickBox and don't add 10 to the x and y coordinates.
This commit is contained in:
parent
0bbf7a00ff
commit
1ce635dbcf
|
@ -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
|
||||
)
|
||||
}
|
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
Loading…
Reference in New Issue