crafting: special 'theme' for the cell for the already-existing

This commit is contained in:
minjaesong
2023-10-01 22:44:16 +09:00
parent f4f00c2e1c
commit f78076fb28
5 changed files with 53 additions and 25 deletions

View File

@@ -32,8 +32,8 @@ class UIItemInventoryElemSimple(
touchDownFun: (GameItem?, Long, Int, Any?, UIItemInventoryCellBase) -> Unit, // Item, Amount, Button, extra info, self
extraInfo: Any? = null,
highlightEquippedItem: Boolean = true, // for some UIs that only cares about getting equipped slot number but not highlighting
var colourTheme: InventoryCellColourTheme = defaultInventoryCellTheme
) : UIItemInventoryCellBase(parentUI, initialX, initialY, item, amount, itemImage, quickslot, equippedSlot, keyDownFun, touchDownFun, extraInfo, highlightEquippedItem) {
colourTheme: InventoryCellColourTheme = defaultInventoryCellTheme
) : UIItemInventoryCellBase(parentUI, initialX, initialY, item, amount, itemImage, quickslot, equippedSlot, keyDownFun, touchDownFun, extraInfo, highlightEquippedItem, colourTheme) {
companion object {
val height = UIItemInventoryElemWide.height
@@ -62,7 +62,7 @@ class UIItemInventoryElemSimple(
// cell background
if (item != null || drawBackOnNull) {
batch.color = Toolkit.Theme.COL_CELL_FILL
batch.color = colourTheme.cellBackgroundCol
Toolkit.fillArea(batch, posX, posY, width, height)
}
// cell border