fix: zoom-out text won't update lang; escmenu won't reset when scrolled from inventory

This commit is contained in:
minjaesong
2023-10-04 15:46:38 +09:00
parent a9f720647e
commit ad0c1d72f3
3 changed files with 4 additions and 2 deletions

View File

@@ -92,6 +92,7 @@ class UIInventoryEscMenu(val full: UIInventoryFull) : UICanvas() {
fun toInitScreen() { fun toInitScreen() {
screen = 0 screen = 0
oldScreen = 0
} }
init { init {
@@ -269,6 +270,7 @@ class UIInventoryEscMenu(val full: UIInventoryFull) : UICanvas() {
override fun show() { override fun show() {
UIItemInventoryItemGrid.tooltipShowing.clear() UIItemInventoryItemGrid.tooltipShowing.clear()
INGAME.setTooltipMessage(null) INGAME.setTooltipMessage(null)
toInitScreen()
} }

View File

@@ -255,7 +255,6 @@ class UIInventoryFull(
INGAME.setTooltipMessage(null) INGAME.setTooltipMessage(null)
transitionPanel.forcePosition(2) transitionPanel.forcePosition(2)
catBar.setSelectedPanel(2) catBar.setSelectedPanel(2)
transitionalEscMenu.toInitScreen()
it.setAsOpen() it.setAsOpen()
} }
else if (it.isOpened) else if (it.isOpened)

View File

@@ -27,7 +27,8 @@ class UIScreenZoom : UICanvas(
handler.allowESCtoClose = false handler.allowESCtoClose = false
} }
val zoomText = "${getKeycapPC(handler.toggleKey!!)} ${Lang["GAME_ACTION_ZOOM_OUT"]}" val zoomText: String
get() = "${getKeycapPC(handler.toggleKey!!)} ${Lang["GAME_ACTION_ZOOM_OUT"]}"
override var width = App.fontGame.getWidth(zoomText) override var width = App.fontGame.getWidth(zoomText)
override var height = App.fontGame.lineHeight.toInt() override var height = App.fontGame.lineHeight.toInt()