Add DeviceControls#dockOnLeft
This commit is contained in:
parent
1d11b9b626
commit
162a3757e4
@ -323,7 +323,8 @@ class DeviceControls<out S : MatteryScreen<*>>(
|
|||||||
val fluidConfig: FluidConfigPlayerInput? = null,
|
val fluidConfig: FluidConfigPlayerInput? = null,
|
||||||
val balanceInputs: BooleanInputWithFeedback? = null,
|
val balanceInputs: BooleanInputWithFeedback? = null,
|
||||||
val upgrades: UpgradeSlots? = null,
|
val upgrades: UpgradeSlots? = null,
|
||||||
val experience: TakeExperienceWidget? = null
|
val experience: TakeExperienceWidget? = null,
|
||||||
|
var dockOnLeft: Boolean = false,
|
||||||
) : EditablePanel<S>(screen, parent, x = parent.width + 3f, height = 0f, width = 0f) {
|
) : EditablePanel<S>(screen, parent, x = parent.width + 3f, height = 0f, width = 0f) {
|
||||||
val itemConfigButton: ButtonPanel<S>?
|
val itemConfigButton: ButtonPanel<S>?
|
||||||
val energyConfigButton: ButtonPanel<S>?
|
val energyConfigButton: ButtonPanel<S>?
|
||||||
@ -736,7 +737,12 @@ class DeviceControls<out S : MatteryScreen<*>>(
|
|||||||
|
|
||||||
override fun preRender(graphics: MGUIGraphics, mouseX: Float, mouseY: Float, partialTick: Float) {
|
override fun preRender(graphics: MGUIGraphics, mouseX: Float, mouseY: Float, partialTick: Float) {
|
||||||
if (parent is FramePanel<*>) {
|
if (parent is FramePanel<*>) {
|
||||||
x = parent!!.width + 3f
|
if (dockOnLeft) {
|
||||||
|
x = -width - 3f
|
||||||
|
} else {
|
||||||
|
x = parent!!.width + 3f
|
||||||
|
}
|
||||||
|
|
||||||
y = dockTop
|
y = dockTop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user