mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-16 16:46:07 +09:00
fix: zoom-out text won't update lang; escmenu won't reset when scrolled from inventory
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user