summaryrefslogtreecommitdiff
path: root/src/main/kotlin/gui/MessageUi.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-09-24 16:41:49 +0200
committerLinnea Gräf <nea@nea.moe>2024-09-24 16:41:49 +0200
commitaa1238430bd0f103f040ed31baadc029bb09529e (patch)
tree05aa9d4f6a1c35166003dc8e306dd2c40a818945 /src/main/kotlin/gui/MessageUi.kt
parentfb40ab45f0b4979420bae066da2244f4fdd52db8 (diff)
downloadultra-notifier-aa1238430bd0f103f040ed31baadc029bb09529e.tar.gz
ultra-notifier-aa1238430bd0f103f040ed31baadc029bb09529e.tar.bz2
ultra-notifier-aa1238430bd0f103f040ed31baadc029bb09529e.zip
snapshot
Diffstat (limited to 'src/main/kotlin/gui/MessageUi.kt')
-rw-r--r--src/main/kotlin/gui/MessageUi.kt27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/main/kotlin/gui/MessageUi.kt b/src/main/kotlin/gui/MessageUi.kt
index 78965b3..f4012da 100644
--- a/src/main/kotlin/gui/MessageUi.kt
+++ b/src/main/kotlin/gui/MessageUi.kt
@@ -1,6 +1,29 @@
package moe.nea.ultranotifier.gui
-import moe.nea.ultranotifier.commands.literalText
+import gg.essential.universal.UGraphics
+import gg.essential.universal.UMatrixStack
+import gg.essential.universal.UScreen
+import java.awt.Color
+
+class MessageUi : UScreen() {
+ override fun onDrawScreen(matrixStack: UMatrixStack, mouseX: Int, mouseY: Int, partialTicks: Float) {
+ super.onDrawScreen(matrixStack, mouseX, mouseY, partialTicks)
+ fillRect(matrixStack,
+ 0.0, 0.0, width.toDouble(), height.toDouble(), Color.RED)
+ }
+
+ fun fillRect(
+ matrixStack: UMatrixStack,
+ left: Double, top: Double, right: Double, bottom: Double,
+ color: Color,
+ ) {
+ val buffer = UGraphics.getFromTessellator()
+ buffer.beginWithDefaultShader(UGraphics.DrawMode.QUADS, UGraphics.CommonVertexFormats.POSITION_COLOR)
+ buffer.pos(matrixStack, left, top, 0.0).color(color).endVertex()
+ buffer.pos(matrixStack, left, bottom, 0.0).color(color).endVertex()
+ buffer.pos(matrixStack, right, bottom, 0.0).color(color).endVertex()
+ buffer.pos(matrixStack, right, top, 0.0).color(color).endVertex()
+ buffer.drawDirect()
+ }
-class MessageUi : BaseScreen(literalText("Messages")) {
}