config key change; uiitemtextbutton can now have tags alongside with the label

This commit is contained in:
minjaesong
2021-09-19 17:06:22 +09:00
parent 66e77e0a01
commit e2101ebc54
25 changed files with 120 additions and 206 deletions

View File

@@ -205,8 +205,8 @@ class BasicDebugInfoWindow : UICanvas() {
val gamepad = (Terrarum.ingame as? TerrarumIngame)?.ingameController?.gamepad
if (gamepad != null) {
drawGamepadAxis(gamepad, batch,
gamepad.getAxis(App.getConfigInt("config_gamepadaxislx")),
gamepad.getAxis(App.getConfigInt("config_gamepadaxisly")),
gamepad.getAxis(App.getConfigInt("control_gamepad_axislx")),
gamepad.getAxis(App.getConfigInt("control_gamepad_axisly")),
App.scr.width - 128 - TinyAlphNum.W * 2,
line(3).toInt()
)

View File

@@ -25,7 +25,7 @@ class UIItemConfigKeycap(
if (keySize < 3) throw IllegalArgumentException("Key size must be greater than 2 (got $keySize)")
CommonResourcePool.addToLoadingList("ui_item_keymap_keycap") {
TextureRegionPack("./assets/graphics/gui/ui_config_keymap_keycap.tga", 8, 32)
TextureRegionPack("./assets/graphics/gui/ui_control_key_map_keycap.tga", 8, 32)
}
CommonResourcePool.loadAll()
}

View File

@@ -44,7 +44,9 @@ open class UIItemTextButton(
val postGapX: Int = 0,
val alignment: Alignment = Alignment.CENTRE,
val hitboxSize: Int = UIItemTextButton.height
val hitboxSize: Int = UIItemTextButton.height,
val tags: Array<String> = arrayOf("")
) : UIItem(parentUI, initialX, initialY) {
companion object {

View File

@@ -53,7 +53,8 @@ class UIItemTextButtonList(
val kinematic: Boolean = false,
val alignment: UIItemTextButton.Companion.Alignment = UIItemTextButton.Companion.Alignment.CENTRE,
val itemHitboxSize: Int = lineHeight
val itemHitboxSize: Int = lineHeight,
tagsCollection: Array<Array<String>> = Array(labelsList.size) { arrayOf("") }
) : UIItem(parentUI, initialX, initialY) {
companion object {
@@ -101,7 +102,8 @@ class UIItemTextButtonList(
preGapX = pregap,
postGapX = postgap,
alignment = alignment,
hitboxSize = itemHitboxSize
hitboxSize = itemHitboxSize,
tags = tagsCollection[i]
)
}
else {
@@ -122,7 +124,8 @@ class UIItemTextButtonList(
preGapX = pregap,
postGapX = postgap,
alignment = alignment,
hitboxSize = itemHitboxSize
hitboxSize = itemHitboxSize,
tags = tagsCollection[i]
)
}
}