config: user-configurable control entries now have config- prefix

This commit is contained in:
minjaesong
2020-11-21 11:24:15 +09:00
parent 44c11cef76
commit b8a7dee7ac
21 changed files with 145 additions and 126 deletions

View File

@@ -38,7 +38,7 @@ class UIBasicInfo(private val player: ActorHumanoid?) : UICanvas() {
ELuptimer += delta
}
if (mouseUp || Gdx.input.isKeyPressed(AppLoader.getConfigInt("keyinteract"))) {
if (mouseUp || Gdx.input.isKeyPressed(AppLoader.getConfigInt("config_keyinteract"))) {
ELuptimer = 0f
ELon = true
}

View File

@@ -157,10 +157,10 @@ package net.torvald.terrarum.modulebasegame.ui
private var isEncumbered = false
private val seekLeft: Int; get() = AppLoader.getConfigInt("keyleft") // getter used to support in-game keybind changing
private val seekRight: Int; get() = AppLoader.getConfigInt("keyright") // getter used to support in-game keybind changing
private val seekUp: Int; get() = AppLoader.getConfigInt("keyup") // getter used to support in-game keybind changing
private val seekDown: Int; get() = AppLoader.getConfigInt("keydown") // getter used to support in-game keybind changing
private val seekLeft: Int; get() = AppLoader.getConfigInt("config_keyleft") // getter used to support in-game keybind changing
private val seekRight: Int; get() = AppLoader.getConfigInt("config_keyright") // getter used to support in-game keybind changing
private val seekUp: Int; get() = AppLoader.getConfigInt("config_keyup") // getter used to support in-game keybind changing
private val seekDown: Int; get() = AppLoader.getConfigInt("config_keydown") // getter used to support in-game keybind changing
init {

View File

@@ -42,7 +42,7 @@ class UIInventoryMinimap(val full: UIInventoryFull) : UICanvas() {
// update map panning
// if left click is down and cursor is in the map area
if (Gdx.input.isButtonPressed(AppLoader.getConfigInt("mouseprimary")) &&
if (Gdx.input.isButtonPressed(AppLoader.getConfigInt("config_mouseprimary")) &&
Terrarum.mouseScreenY in full.INVENTORY_CELLS_OFFSET_Y..full.INVENTORY_CELLS_OFFSET_Y + full.INVENTORY_CELLS_UI_HEIGHT) {
minimapPanX += Terrarum.mouseDeltaX * 2f / minimapZoom
minimapPanY += Terrarum.mouseDeltaY * 2f / minimapZoom

View File

@@ -16,7 +16,7 @@ import net.torvald.terrarum.ui.UICanvas
* Created by minjaesong on 2019-08-11.
*/
class UIScreenZoom : UICanvas(
AppLoader.getConfigInt("keyzoom")
AppLoader.getConfigInt("config_keyzoom")
) {
val zoomText = "${keyToIcon(handler.toggleKeyLiteral!!)} $EMDASH Zoom Out"

View File

@@ -47,7 +47,7 @@ class UITierOneWatch(private val player: ActorHumanoid?) : UICanvas() {
ELuptimer += delta
}
if (mouseUp || Gdx.input.isKeyPressed(AppLoader.getConfigInt("keyinteract"))) {
if (mouseUp || Gdx.input.isKeyPressed(AppLoader.getConfigInt("config_keyinteract"))) {
ELuptimer = 0f
ELon = true
}