Add profiled gauge widget to item monitor menu
This commit is contained in:
parent
4a606e78b0
commit
4e17c00099
@ -25,6 +25,7 @@ import ru.dbotthepony.mc.otm.client.screen.panels.util.DiscreteScrollBarPanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.util.GridPanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.widget.WidePowerGaugePanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.widget.WideProfiledPowerGaugePanel
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
import ru.dbotthepony.mc.otm.core.asGetterSetter
|
||||
import ru.dbotthepony.mc.otm.core.util.ItemStorageStackSorter
|
||||
@ -156,7 +157,7 @@ class ItemMonitorScreen(menu: ItemMonitorMenu, inventory: Inventory, title: Comp
|
||||
leftStrip.height += it.height
|
||||
}
|
||||
|
||||
WidePowerGaugePanel(this, leftStrip, menu.energyWidget).also {
|
||||
WideProfiledPowerGaugePanel(this, leftStrip, menu.profiledEnergy).also {
|
||||
it.dock = Dock.FILL
|
||||
it.dockResize = DockResizeMode.NONE
|
||||
leftStrip.height += it.height
|
||||
|
@ -20,6 +20,7 @@ import ru.dbotthepony.mc.otm.menu.data.NetworkedItemView
|
||||
import ru.dbotthepony.mc.otm.menu.input.BooleanInputWithFeedback
|
||||
import ru.dbotthepony.mc.otm.menu.input.EnumInputWithFeedback
|
||||
import ru.dbotthepony.mc.otm.menu.makeSlots
|
||||
import ru.dbotthepony.mc.otm.menu.widget.ProfiledLevelGaugeWidget
|
||||
import ru.dbotthepony.mc.otm.registry.MMenus
|
||||
import ru.dbotthepony.mc.otm.storage.*
|
||||
import java.util.*
|
||||
@ -84,6 +85,7 @@ class ItemMonitorMenu(
|
||||
tile: ItemMonitorBlockEntity? = null
|
||||
) : MatteryPoweredMenu(MMenus.ITEM_MONITOR, containerId, inventory, tile), INetworkedItemViewProvider {
|
||||
override val networkedItemView = NetworkedItemView(inventory.player, this, tile == null)
|
||||
val profiledEnergy = ProfiledLevelGaugeWidget(this, tile?.energy, energyWidget)
|
||||
|
||||
val settings = object : IItemMonitorPlayerSettings {
|
||||
override var ingredientPriority by EnumInputWithFeedback(this@ItemMonitorMenu, true, tile?.let { it.getSettings(player as ServerPlayer)::ingredientPriority })
|
||||
|
Loading…
Reference in New Issue
Block a user