v1.2.0: fixed item slots in wndbag not being disabled in some cases

This commit is contained in:
Evan Debenham 2022-01-31 18:27:15 -05:00
parent 8ce8d485dc
commit 992df8f179

View File

@ -308,6 +308,10 @@ public class WndBag extends WndTabbed {
}; };
slot.setRect( x, y, slotWidth, slotHeight ); slot.setRect( x, y, slotWidth, slotHeight );
add(slot); add(slot);
if (item == null || (selector != null && !selector.itemSelectable(item))){
slot.enable(false);
}
if (++col >= nCols) { if (++col >= nCols) {
col = 0; col = 0;