mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
sprite updates
Former-commit-id: a52e024a231e54e7e837b7c717606f4f0d187758 Former-commit-id: fcdb5a9e12802c9671bea24481c94a8876dfd418
This commit is contained in:
@@ -31,14 +31,14 @@ constructor(override var width: Int, isBlackVariant: Boolean) : UICanvas {
|
||||
|
||||
init {
|
||||
if (!isBlackVariant) {
|
||||
segmentLeft = Image("./assets/graphics/gui/message_twoline_white_left.png");
|
||||
segmentRight = Image("./assets/graphics/gui/message_twoline_white_right.png");
|
||||
segmentBody = Image("./assets/graphics/gui/message_twoline_white_body.png");
|
||||
segmentLeft = Image("./assets/graphics/gui/message_twoline_white_left.tga")
|
||||
segmentRight = Image("./assets/graphics/gui/message_twoline_white_right.tga")
|
||||
segmentBody = Image("./assets/graphics/gui/message_twoline_white_body.tga")
|
||||
}
|
||||
else {
|
||||
segmentLeft = Image("./assets/graphics/gui/message_twoline_black_left.png")
|
||||
segmentRight = Image("./assets/graphics/gui/message_twoline_black_right.png")
|
||||
segmentBody = Image("./assets/graphics/gui/message_twoline_black_body.png")
|
||||
segmentLeft = Image("./assets/graphics/gui/message_black_left.tga")
|
||||
segmentRight = Image("./assets/graphics/gui/message_black_right.tga")
|
||||
segmentBody = Image("./assets/graphics/gui/message_black_body.tga")
|
||||
}
|
||||
uiFont = GameFontWhite()
|
||||
height = segmentLeft!!.height
|
||||
@@ -55,34 +55,17 @@ constructor(override var width: Int, isBlackVariant: Boolean) : UICanvas {
|
||||
}
|
||||
|
||||
override fun render(gc: GameContainer, g: Graphics) {
|
||||
// using the texture
|
||||
/*blendDisable()
|
||||
|
||||
drawSegments(g)
|
||||
g.setDrawMode(Graphics.MODE_ALPHA_MAP)
|
||||
blendNormal()
|
||||
drawSegments(g)
|
||||
|
||||
g.font = uiFont
|
||||
|
||||
g.setDrawMode(Graphics.MODE_NORMAL)
|
||||
|
||||
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())
|
||||
}
|
||||
|
||||
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(gc: GameContainer, delta: Int, input: Input) {
|
||||
|
||||
Reference in New Issue
Block a user