fixed bug: things go dark as inventory is opened

Not cloning the color when MULing was the culprit
This commit is contained in:
minjaesong
2017-07-03 02:55:33 +09:00
parent 9b32cf63ff
commit 2ea3ce0c67
9 changed files with 41 additions and 32 deletions

View File

@@ -216,7 +216,6 @@ class UIInventory(
controlHelpHeight - 5f
)
}
}
/** Persuade the UI to rebuild its item list */

View File

@@ -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 {

View File

@@ -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 {