mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
config: user-configurable control entries now have config- prefix
This commit is contained in:
@@ -203,8 +203,8 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
val gamepad = (Terrarum.ingame as? TerrarumIngame)?.ingameController?.gamepad
|
||||
if (gamepad != null) {
|
||||
drawGamepadAxis(gamepad, batch,
|
||||
gamepad.getAxis(AppLoader.getConfigInt("gamepadaxislx")),
|
||||
gamepad.getAxis(AppLoader.getConfigInt("gamepadaxisly")),
|
||||
gamepad.getAxis(AppLoader.getConfigInt("config_gamepadaxislx")),
|
||||
gamepad.getAxis(AppLoader.getConfigInt("config_gamepadaxisly")),
|
||||
AppLoader.screenW - 128 - TinyAlphNum.W * 2,
|
||||
line(3).toInt()
|
||||
)
|
||||
|
||||
@@ -90,7 +90,7 @@ abstract class UICanvas(
|
||||
get() = _mouseUpThis || handler.mouseUp
|
||||
/** If mouse is hovering over it and mouse is down */
|
||||
val mousePushed: Boolean
|
||||
get() = mouseUp && Gdx.input.isButtonPressed(AppLoader.getConfigInt("mouseprimary"))
|
||||
get() = mouseUp && Gdx.input.isButtonPressed(AppLoader.getConfigInt("config_mouseprimary"))
|
||||
|
||||
private val _mouseUpThis: Boolean
|
||||
get() = relativeMouseX in 0..width - 1 && relativeMouseY in 0..height - 1
|
||||
|
||||
@@ -89,7 +89,7 @@ abstract class UIItem(var parentUI: UICanvas, val initialX: Int, val initialY: I
|
||||
get() = relativeMouseX in 0..width - 1 && relativeMouseY in 0..height - 1
|
||||
/** If mouse is hovering over it and mouse is down */
|
||||
open val mousePushed: Boolean
|
||||
get() = mouseUp && Gdx.input.isButtonPressed(AppLoader.getConfigInt("mouseprimary"))
|
||||
get() = mouseUp && Gdx.input.isButtonPressed(AppLoader.getConfigInt("config_mouseprimary"))
|
||||
|
||||
|
||||
/** UI to call (show up) while mouse is up */
|
||||
|
||||
Reference in New Issue
Block a user