Enable inventory scrollbar when having exopack installed, and not having at least 1 extra slot in it
This commit is contained in:
parent
dd91bd2f17
commit
15b718f28a
@ -209,12 +209,9 @@ abstract class MatteryScreen<T : MatteryMenu>(menu: T, inventory: Inventory, tit
|
|||||||
if (menu.playerInventorySlots.isNotEmpty() && menu.autoCreateInventoryFrame) {
|
if (menu.playerInventorySlots.isNotEmpty() && menu.autoCreateInventoryFrame) {
|
||||||
val deviceControls: DeviceControls<MatteryScreen<*>>
|
val deviceControls: DeviceControls<MatteryScreen<*>>
|
||||||
|
|
||||||
if (menu.playerCombinedInventorySlots.size <= 27) {
|
if (menu.player.matteryPlayer?.hasExopack != true) {
|
||||||
inventoryFrame = FramePanel<MatteryScreen<*>>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH, INVENTORY_FRAME_HEIGHT, inventory.displayName).also(this::addPanel)
|
inventoryFrame = FramePanel<MatteryScreen<*>>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH, INVENTORY_FRAME_HEIGHT, inventory.displayName).also(this::addPanel)
|
||||||
inventoryFrame!!.makeHelpButton().addSlotFiltersHelp().also {
|
inventoryFrame!!.makeHelpButton().addSlotFiltersHelp()
|
||||||
if (menu.player.matteryPlayer?.hasExopack == true)
|
|
||||||
it.tooltips.add(TranslatableComponent("otm.gui.help.slot_charging"))
|
|
||||||
}
|
|
||||||
|
|
||||||
deviceControls = DeviceControls(this, inventoryFrame!!)
|
deviceControls = DeviceControls(this, inventoryFrame!!)
|
||||||
|
|
||||||
@ -247,8 +244,7 @@ abstract class MatteryScreen<T : MatteryMenu>(menu: T, inventory: Inventory, tit
|
|||||||
} else {
|
} else {
|
||||||
inventoryFrame = FramePanel<MatteryScreen<*>>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH_EXTENDED, BASE_INVENTORY_FRAME_HEIGHT + AbstractSlotPanel.SIZE * inventoryRows, inventory.displayName).also(this::addPanel)
|
inventoryFrame = FramePanel<MatteryScreen<*>>(this, null, 0f, 0f, INVENTORY_FRAME_WIDTH_EXTENDED, BASE_INVENTORY_FRAME_HEIGHT + AbstractSlotPanel.SIZE * inventoryRows, inventory.displayName).also(this::addPanel)
|
||||||
inventoryFrame!!.makeHelpButton().addSlotFiltersHelp().also {
|
inventoryFrame!!.makeHelpButton().addSlotFiltersHelp().also {
|
||||||
if (menu.player.matteryPlayer?.hasExopack == true)
|
it.tooltips.add(TranslatableComponent("otm.gui.help.slot_charging"))
|
||||||
it.tooltips.add(TranslatableComponent("otm.gui.help.slot_charging"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceControls = DeviceControls(this, inventoryFrame!!)
|
deviceControls = DeviceControls(this, inventoryFrame!!)
|
||||||
|
Loading…
Reference in New Issue
Block a user