fix: game crashes on pasting text

This commit is contained in:
minjaesong
2024-02-17 15:26:18 +09:00
parent a7ba39a43c
commit 6da155d4f3
4 changed files with 9 additions and 7 deletions

View File

@@ -119,6 +119,8 @@ object ControlPanelCommon {
}
}
else if (args.startsWith("typeinres")) {
val oldwidth = App.scr.width
val oldheight = App.scr.height
val keyWidth = optionNames[0]
val keyHeight = optionNames[1]
UIItemTextLineInput(parent, x, y, CONFIG_SPINNER_WIDTH,
@@ -178,8 +180,8 @@ object ControlPanelCommon {
}
else {
it.markAsInvalid()
App.setConfig(keyWidth, TerrarumScreenSize.defaultW)
App.setConfig(keyHeight, TerrarumScreenSize.defaultH)
App.setConfig(keyWidth, oldwidth)
App.setConfig(keyHeight, oldheight)
}
}
}