mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
new message window UI
Former-commit-id: 569893135ece2ce7584105b3d01eb89f6f67d9f0 Former-commit-id: 7089d0bf8986ca993a69062d0a6adff1889ce8cc
This commit is contained in:
@@ -55,7 +55,8 @@ constructor(override var width: Int, isBlackVariant: Boolean) : UICanvas {
|
||||
}
|
||||
|
||||
override fun render(gc: GameContainer, g: Graphics) {
|
||||
blendDisable()
|
||||
// using the texture
|
||||
/*blendDisable()
|
||||
|
||||
drawSegments(g)
|
||||
g.setDrawMode(Graphics.MODE_ALPHA_MAP)
|
||||
@@ -69,7 +70,19 @@ constructor(override var width: Int, isBlackVariant: Boolean) : UICanvas {
|
||||
g.drawString(messagesList[i], (messageWindowRadius + 4).toFloat(), (messageWindowRadius + GLYPH_HEIGHT * i).toFloat())
|
||||
}
|
||||
|
||||
blendNormal()*/
|
||||
|
||||
// scroll-like, kinda Microsoft-y
|
||||
blendNormal()
|
||||
g.color = Color(0f, 0f, 0f, 0.7f)
|
||||
g.fillRect(0f, 0f, width.toFloat(), height.toFloat())
|
||||
g.color = Color(1f, 1f, 1f, 0.5f)
|
||||
g.fillRect(0f, 0f, 2f, height.toFloat())
|
||||
g.fillRect(width - 2f, 0f, 2f, height.toFloat())
|
||||
for (i in 0..Math.min(messagesList.size, MESSAGES_DISPLAY) - 1) {
|
||||
g.color = fontCol
|
||||
g.drawString(messagesList[i], (messageWindowRadius + 4).toFloat(), (messageWindowRadius + GLYPH_HEIGHT * i).toFloat())
|
||||
}
|
||||
}
|
||||
|
||||
override fun processInput(input: Input) {
|
||||
|
||||
Reference in New Issue
Block a user