configurable inventory toss key

This commit is contained in:
minjaesong
2023-10-03 14:26:58 +09:00
parent 48a07a9be5
commit b206268e05
3 changed files with 45 additions and 36 deletions

Binary file not shown.

View File

@@ -23,5 +23,7 @@
"GAME_INVENTORY_INGREDIENTS": "Ingredients",
"GAME_INVENTORY_POTIONS": "Potions",
"GAME_INVENTORY_REGISTER": "Register",
"GAME_INVENTORY_WALLS": "Walls"
"GAME_INVENTORY_WALLS": "Walls",
"GAME_INVENTORY_DROP": "Toss" /* overwrites Polyglot; please don't include this line for translation */
}

View File

@@ -159,7 +159,8 @@ class UIKeyboardControlPanel(remoCon: UIRemoCon?) : UICanvas() {
"control_key_toggleime",
"control_key_movementaux",
"control_key_quicksel",
"control_key_crafting"
"control_key_crafting",
"control_key_discard",
).forEach {
App.setConfig(it, DefaultConfig.hashMap[it]!! as Int)
}
@@ -180,6 +181,7 @@ class UIKeyboardControlPanel(remoCon: UIRemoCon?) : UICanvas() {
keycaps[ControlPresets.getKey("control_key_gamemenu")]?.symbolControl = Keebsym.MENU
keycaps[ControlPresets.getKey("control_key_toggleime")]?.symbolControl = Keebsym.IME()
keycaps[ControlPresets.getKey("control_key_crafting")]?.symbolControl = Keebsym.CRAFTING
keycaps[ControlPresets.getKey("control_key_discard")]?.symbolControl = Keebsym.DISCARD
}
internal var keycapClicked = -13372
@@ -422,6 +424,8 @@ class UIItemControlPaletteBaloon(val parent: UIKeyboardControlPanel, initialX: I
UIItemImageButton(parent, Keebsym.IME(), initialX = col1, initialY = row2, highlightable = false, backgroundCol = Color(0), activeBackCol = Color(0), highlightBackCol = Color(0)),
// system menu
UIItemImageButton(parent, Keebsym.MENU, initialX = col1, initialY = row3, highlightable = false, backgroundCol = Color(0), activeBackCol = Color(0), highlightBackCol = Color(0)),
// toss item
UIItemImageButton(parent, Keebsym.DISCARD, initialX = col1, initialY = row4, highlightable = false, backgroundCol = Color(0), activeBackCol = Color(0), highlightBackCol = Color(0)),
)
@@ -447,6 +451,7 @@ class UIItemControlPaletteBaloon(val parent: UIKeyboardControlPanel, initialX: I
9 to "control_key_zoom",
10 to "control_key_toggleime",
11 to "control_key_gamemenu",
12 to "control_key_discard",
)
}
@@ -479,6 +484,7 @@ class UIItemControlPaletteBaloon(val parent: UIKeyboardControlPanel, initialX: I
App.fontGame.draw(batch, Lang["GAME_ACTION_ZOOM"], col1 + 40, row1 - 2)
App.fontGame.draw(batch, Lang["MENU_LABEL_IME_TOGGLE"], col1 + 40, row2 - 2)
App.fontGame.draw(batch, Lang["MENU_LABEL_MENU"], col1 + 40, row3 - 2)
App.fontGame.draw(batch, Lang["GAME_INVENTORY_DROP"], col1 + 40, row4 - 2)
}
@@ -530,4 +536,5 @@ private object Keebsym {
}
val CRAFTING = labels.get(9,1)
val DISCARD = labels.get(10, 1)
}