Move exosuit inventory switch button
This commit is contained in:
parent
36ccaa9f66
commit
5d44204c07
@ -62,8 +62,8 @@ fun onPostScreenInit(event: ScreenEvent.Init.Post) {
|
|||||||
|
|
||||||
if (player.hasExoSuit) {
|
if (player.hasExoSuit) {
|
||||||
val widget = Panel2Widget(LargeRectangleButtonPanel(screen, null,
|
val widget = Panel2Widget(LargeRectangleButtonPanel(screen, null,
|
||||||
x = screen.guiLeft + screen.xSize + 2f,
|
x = screen.guiLeft + screen.xSize - 2f - LargeRectangleButtonPanel.SIZE,
|
||||||
y = screen.guiTop.toFloat(),
|
y = screen.guiTop.toFloat() - LargeRectangleButtonPanel.SIZE - 2,
|
||||||
skinElement = Widgets18.RETURN_ARROW_LEFT,
|
skinElement = Widgets18.RETURN_ARROW_LEFT,
|
||||||
skinElementWinding = UVWindingOrder.FLOP,
|
skinElementWinding = UVWindingOrder.FLOP,
|
||||||
onPress = {
|
onPress = {
|
||||||
@ -80,8 +80,8 @@ fun onPostScreenInit(event: ScreenEvent.Init.Post) {
|
|||||||
event.addListener(widget)
|
event.addListener(widget)
|
||||||
|
|
||||||
tickWhileClient({ minecraft.screen == screen }) {
|
tickWhileClient({ minecraft.screen == screen }) {
|
||||||
widget.panel.x = screen.guiLeft + screen.xSize + 2f
|
widget.panel.x = screen.guiLeft + screen.xSize - 2f - LargeRectangleButtonPanel.SIZE
|
||||||
widget.panel.y = screen.guiTop.toFloat()
|
widget.panel.y = screen.guiTop.toFloat() - LargeRectangleButtonPanel.SIZE - 2f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ class ExoSuitInventoryScreen(menu: ExoSuitInventoryMenu) : MatteryScreen<ExoSuit
|
|||||||
scrollPanel.dock = Dock.RIGHT
|
scrollPanel.dock = Dock.RIGHT
|
||||||
scrollPanel.setDockMargin(right = 3f)
|
scrollPanel.setDockMargin(right = 3f)
|
||||||
|
|
||||||
LargeRectangleButtonPanel(this, frame, x = frame.width + 2f, skinElement = Widgets18.RETURN_ARROW_LEFT, onPress = {
|
LargeRectangleButtonPanel(this, frame, x = frame.width - 2f - LargeRectangleButtonPanel.SIZE, y = -LargeRectangleButtonPanel.SIZE - 2f, skinElement = Widgets18.RETURN_ARROW_LEFT, onPress = {
|
||||||
shouldOpenVanillaInventory = true
|
shouldOpenVanillaInventory = true
|
||||||
val minecraft = minecraft!!
|
val minecraft = minecraft!!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user