mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
item count and durability meter on the quickslot
This commit is contained in:
@@ -92,12 +92,11 @@ class UIItemInventoryElemSimple(
|
||||
val percentage = item!!.durability / item!!.maxDurability
|
||||
val durabilityCol = UIItemInventoryCellCommonRes.getHealthMeterColour(percentage, 0f, 1f)
|
||||
val durabilityBack = durabilityCol mul UIItemInventoryCellCommonRes.meterBackDarkening
|
||||
if (item!!.maxDurability > 0.0) {
|
||||
batch.color = durabilityBack
|
||||
Toolkit.drawStraightLine(batch, barOffset, posY + height - thickness, barOffset + barFullLen, thickness, false)
|
||||
batch.color = durabilityCol
|
||||
Toolkit.drawStraightLine(batch, barOffset, posY + height - thickness, barOffset + (barFullLen * percentage).roundToInt(), thickness, false)
|
||||
}
|
||||
|
||||
batch.color = durabilityBack
|
||||
Toolkit.drawStraightLine(batch, barOffset, posY + height - thickness, barOffset + barFullLen, thickness, false)
|
||||
batch.color = durabilityCol
|
||||
Toolkit.drawStraightLine(batch, barOffset, posY + height - thickness, barOffset + (barFullLen * percentage).roundToInt(), thickness, false)
|
||||
}
|
||||
// draw item count when applicable
|
||||
else if (item!!.stackable) {
|
||||
|
||||
Reference in New Issue
Block a user