summaryrefslogtreecommitdiff
path: root/src/main/kotlin/gui
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-09-24 13:16:55 +0200
committerLinnea Gräf <nea@nea.moe>2024-09-24 13:16:55 +0200
commitfb40ab45f0b4979420bae066da2244f4fdd52db8 (patch)
tree66afc558aade18c996b23da47a02f6726fb656aa /src/main/kotlin/gui
parent8a5c5d45f87f38d9a7484b73c0505b95e63a21f1 (diff)
downloadultra-notifier-fb40ab45f0b4979420bae066da2244f4fdd52db8.tar.gz
ultra-notifier-fb40ab45f0b4979420bae066da2244f4fdd52db8.tar.bz2
ultra-notifier-fb40ab45f0b4979420bae066da2244f4fdd52db8.zip
snapshot
Diffstat (limited to 'src/main/kotlin/gui')
-rw-r--r--src/main/kotlin/gui/BaseScreen.kt52
-rw-r--r--src/main/kotlin/gui/MessageUi.kt6
2 files changed, 58 insertions, 0 deletions
diff --git a/src/main/kotlin/gui/BaseScreen.kt b/src/main/kotlin/gui/BaseScreen.kt
new file mode 100644
index 0000000..06aafb9
--- /dev/null
+++ b/src/main/kotlin/gui/BaseScreen.kt
@@ -0,0 +1,52 @@
+package moe.nea.ultranotifier.gui
+
+import net.minecraft.client.gui.DrawContext
+import net.minecraft.client.gui.screen.Screen
+import net.minecraft.text.Text
+//#if MC < 1.20.4
+//$$import com.mojang.blaze3d.platform.GlStateManager
+//#endif
+
+class DrawingContext(
+//#if MC > 1.20.4
+ val vanilla: DrawContext,
+//#endif
+) {
+ fun pushMatrix() {
+//#if MC > 1.20.4
+ vanilla.matrices.push()
+//#else
+//$$ GlStateManager.pushMatrix()
+//#endif
+ }
+ fun popMatrix() {
+//#if MC > 1.20.4
+ vanilla.matrices.pop()
+//#else
+//$$ GlStateManager.popMatrix()
+//#endif
+ }
+ fun translate(x: Double, y: Double, z: Double) {
+//#if MC > 1.20.4
+ vanilla.matrices.translate(x, y, z)
+//#else
+//$$ GlStateManager.translate(x, y, z)
+//#endif
+ }
+ fun scale(x: Float, y: Float, z: Float) {
+//#if MC > 1.20.4
+ vanilla.matrices.scale(x, y, z)
+//#else
+//$$ GlStateManager.scale(x, y, z)
+//#endif
+ }
+
+}
+
+abstract class BaseScreen(title: Text) : Screen(
+//#if MC >= 11400
+ title
+//#endif
+) {
+
+}
diff --git a/src/main/kotlin/gui/MessageUi.kt b/src/main/kotlin/gui/MessageUi.kt
new file mode 100644
index 0000000..78965b3
--- /dev/null
+++ b/src/main/kotlin/gui/MessageUi.kt
@@ -0,0 +1,6 @@
+package moe.nea.ultranotifier.gui
+
+import moe.nea.ultranotifier.commands.literalText
+
+class MessageUi : BaseScreen(literalText("Messages")) {
+}