summaryrefslogtreecommitdiff
path: root/src/main/kotlin/gui/MessageUi.kt
diff options
context:
space:
mode:
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")) {
}