mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 11:34:05 +09:00
config key change; uiitemtextbutton can now have tags alongside with the label
This commit is contained in:
@@ -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()
|
||||
)
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user