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.kt26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/main/kotlin/gui/MessageUi.kt b/src/main/kotlin/gui/MessageUi.kt
index f4012da..f3feeb7 100644
--- a/src/main/kotlin/gui/MessageUi.kt
+++ b/src/main/kotlin/gui/MessageUi.kt
@@ -1,29 +1,19 @@
package moe.nea.ultranotifier.gui
-import gg.essential.universal.UGraphics
import gg.essential.universal.UMatrixStack
import gg.essential.universal.UScreen
+import moe.nea.ultranotifier.util.render.ScreenRenderUtils
+import moe.nea.ultranotifier.util.ultraIdentifier
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)
+ ScreenRenderUtils.fillRect(matrixStack, 0.0, 0.0, width.toDouble(), height.toDouble(), Color.RED)
+ ScreenRenderUtils.renderTexture(
+ ultraIdentifier("textures/gui/square_panel.png"),
+ matrixStack,
+ 200.0, 0.0, 300.0, 100.0
+ )
}
-
- 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()
- }
-
}