mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
fixed bug: things go dark as inventory is opened
Not cloning the color when MULing was the culprit
This commit is contained in:
@@ -216,7 +216,6 @@ class UIInventory(
|
||||
controlHelpHeight - 5f
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Persuade the UI to rebuild its item list */
|
||||
|
||||
@@ -68,18 +68,16 @@ class UIItemTextButton(
|
||||
blendNormal()
|
||||
|
||||
|
||||
batch.inUse {
|
||||
mouseOver = mouseUp
|
||||
batch.color = if (highlighted) highlightCol
|
||||
else if (mouseOver) activeCol
|
||||
else inactiveCol
|
||||
mouseOver = mouseUp
|
||||
batch.color = if (highlighted) highlightCol
|
||||
else if (mouseOver) activeCol
|
||||
else inactiveCol
|
||||
|
||||
font.draw(batch,
|
||||
label,
|
||||
posX.toFloat() + width.minus(textW).div(2) + (preGapX - postGapX).div(2),
|
||||
posY.toFloat() + height / 4
|
||||
)
|
||||
}
|
||||
font.draw(batch,
|
||||
label,
|
||||
posX.toFloat() + width.minus(textW).div(2) + (preGapX - postGapX).div(2),
|
||||
posY.toFloat() + height / 4
|
||||
)
|
||||
}
|
||||
|
||||
override fun keyDown(keycode: Int): Boolean {
|
||||
|
||||
@@ -155,18 +155,16 @@ class UIItemTextButtonList(
|
||||
buttons.forEach { it.render(batch) }
|
||||
|
||||
|
||||
batch.inUse {
|
||||
if (iconSpriteSheet != null) {
|
||||
val iconY = (buttons[1].height - iconCellHeight) / 2
|
||||
batch.color = iconCol
|
||||
if (iconSpriteSheet != null) {
|
||||
val iconY = (buttons[1].height - iconCellHeight) / 2
|
||||
batch.color = iconCol
|
||||
|
||||
iconSpriteSheetIndices!!.forEachIndexed { counter, imageIndex ->
|
||||
batch.draw(iconSpriteSheet.get(imageIndex, 0), 32f, buttons[counter].posY + iconY.toFloat())
|
||||
}
|
||||
iconSpriteSheetIndices!!.forEachIndexed { counter, imageIndex ->
|
||||
batch.draw(iconSpriteSheet.get(imageIndex, 0), 32f, buttons[counter].posY + iconY.toFloat())
|
||||
}
|
||||
|
||||
batch.color = backgroundCol
|
||||
}
|
||||
|
||||
batch.color = backgroundCol
|
||||
}
|
||||
|
||||
override fun keyDown(keycode: Int): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user