Move exosuit inventory switch button

This commit is contained in:
DBotThePony 2022-09-11 19:22:07 +07:00
parent 36ccaa9f66
commit 5d44204c07
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 5 additions and 5 deletions

View File

@ -62,8 +62,8 @@ fun onPostScreenInit(event: ScreenEvent.Init.Post) {
if (player.hasExoSuit) {
val widget = Panel2Widget(LargeRectangleButtonPanel(screen, null,
x = screen.guiLeft + screen.xSize + 2f,
y = screen.guiTop.toFloat(),
x = screen.guiLeft + screen.xSize - 2f - LargeRectangleButtonPanel.SIZE,
y = screen.guiTop.toFloat() - LargeRectangleButtonPanel.SIZE - 2,
skinElement = Widgets18.RETURN_ARROW_LEFT,
skinElementWinding = UVWindingOrder.FLOP,
onPress = {
@ -80,8 +80,8 @@ fun onPostScreenInit(event: ScreenEvent.Init.Post) {
event.addListener(widget)
tickWhileClient({ minecraft.screen == screen }) {
widget.panel.x = screen.guiLeft + screen.xSize + 2f
widget.panel.y = screen.guiTop.toFloat()
widget.panel.x = screen.guiLeft + screen.xSize - 2f - LargeRectangleButtonPanel.SIZE
widget.panel.y = screen.guiTop.toFloat() - LargeRectangleButtonPanel.SIZE - 2f
}
}
}

View File

@ -152,7 +152,7 @@ class ExoSuitInventoryScreen(menu: ExoSuitInventoryMenu) : MatteryScreen<ExoSuit
scrollPanel.dock = Dock.RIGHT
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
val minecraft = minecraft!!