mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
control scheme update
This commit is contained in:
@@ -17,8 +17,7 @@ object DefaultConfig {
|
|||||||
jsonObject.addProperty("usevsync", true)
|
jsonObject.addProperty("usevsync", true)
|
||||||
|
|
||||||
|
|
||||||
jsonObject.addProperty("smoothlighting", true)
|
jsonObject.addProperty("imtooyoungtodie", false) // no perma-death
|
||||||
jsonObject.addProperty("imtooyoungtodie", false) // perma-death
|
|
||||||
jsonObject.addProperty("language", TerrarumGDX.sysLang)
|
jsonObject.addProperty("language", TerrarumGDX.sysLang)
|
||||||
jsonObject.addProperty("notificationshowuptime", 6500)
|
jsonObject.addProperty("notificationshowuptime", 6500)
|
||||||
jsonObject.addProperty("multithread", true) // experimental!
|
jsonObject.addProperty("multithread", true) // experimental!
|
||||||
@@ -41,24 +40,24 @@ object DefaultConfig {
|
|||||||
jsonObject.addProperty("joypadrstickx", 2)
|
jsonObject.addProperty("joypadrstickx", 2)
|
||||||
jsonObject.addProperty("joypadrsticky", 3) // 0-1-2-3 but sometimes 3-2-1-0 ?! what the actual fuck?
|
jsonObject.addProperty("joypadrsticky", 3) // 0-1-2-3 but sometimes 3-2-1-0 ?! what the actual fuck?
|
||||||
|
|
||||||
jsonObject.addProperty("joypadlabelstyle", "generic") // "nwii", "logitech", "sonyps", "msxb360", "generic"
|
jsonObject.addProperty("joypadlabelstyle", "msxb360") // "nwii", "logitech", "sonyps", "msxb360", "generic"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// control-keyboard (Java key codes. This is what Minecraft also uses)
|
// control-keyboard (GDX key codes)
|
||||||
jsonObject.addProperty("keyup", Input.Keys.E)
|
jsonObject.addProperty("keyup", Input.Keys.E)
|
||||||
jsonObject.addProperty("keyleft", Input.Keys.S)
|
jsonObject.addProperty("keyleft", Input.Keys.S)
|
||||||
jsonObject.addProperty("keydown", Input.Keys.D)
|
jsonObject.addProperty("keydown", Input.Keys.D)
|
||||||
jsonObject.addProperty("keyright", Input.Keys.F)
|
jsonObject.addProperty("keyright", Input.Keys.F)
|
||||||
|
|
||||||
jsonObject.addProperty("keymovementaux", Input.Keys.W) // movement-auxiliary, or hookshot
|
jsonObject.addProperty("keymovementaux", Input.Keys.A) // movement-auxiliary, or hookshot
|
||||||
jsonObject.addProperty("keyinventory", Input.Keys.Q)
|
jsonObject.addProperty("keyinventory", Input.Keys.Q)
|
||||||
jsonObject.addProperty("keyinteract", Input.Keys.R)
|
jsonObject.addProperty("keyinteract", Input.Keys.R)
|
||||||
jsonObject.addProperty("keyclose", Input.Keys.C)
|
jsonObject.addProperty("keyclose", Input.Keys.C)
|
||||||
|
|
||||||
jsonObject.addProperty("keygamemenu", Input.Keys.TAB)
|
jsonObject.addProperty("keygamemenu", Input.Keys.TAB)
|
||||||
jsonObject.addProperty("keyquicksel", Input.Keys.A) // pie menu (A) because GDX does not read CapsLock
|
jsonObject.addProperty("keyquicksel", Input.Keys.SHIFT_LEFT) // pie menu (A) because GDX does not read CapsLock
|
||||||
val keyquickselalt = JsonArray(); keyquickselalt.add(Input.Keys.BACKSPACE); keyquickselalt.add(Input.Keys.CONTROL_LEFT)
|
val keyquickselalt = JsonArray(); keyquickselalt.add(Input.Keys.BACKSPACE); keyquickselalt.add(Input.Keys.CONTROL_LEFT); keyquickselalt.add(Input.Keys.BACKSLASH)
|
||||||
// Colemak, Workman and some typers use CapsLock as Backspace, Apple-JIS and HHKB has Control in place of CapsLock and often re-assigned to Command
|
// Colemak, Workman and some typers use CapsLock as Backspace, Apple-JIS and HHKB has Control in place of CapsLock and often re-assigned to Command
|
||||||
// so these keys are treated as the same.
|
// so these keys are treated as the same.
|
||||||
// FOR ~~FUCKS~~ERGONOMICS' SAKE DON'T USE CTRL AND ALT AS A KEY!
|
// FOR ~~FUCKS~~ERGONOMICS' SAKE DON'T USE CTRL AND ALT AS A KEY!
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen {
|
|||||||
private val shaderProgram = 0
|
private val shaderProgram = 0
|
||||||
|
|
||||||
val KEY_LIGHTMAP_RENDER = Input.Keys.F7
|
val KEY_LIGHTMAP_RENDER = Input.Keys.F7
|
||||||
val KEY_LIGHTMAP_SMOOTH = Input.Keys.F8
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -203,8 +202,6 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen {
|
|||||||
notifier.setPosition(
|
notifier.setPosition(
|
||||||
(Gdx.graphics.width - notifier.UI.width) / 2, Gdx.graphics.height - notifier.UI.height)
|
(Gdx.graphics.width - notifier.UI.width) / 2, Gdx.graphics.height - notifier.UI.height)
|
||||||
|
|
||||||
// set smooth lighting as in config
|
|
||||||
KeyToggler.forceSet(KEY_LIGHTMAP_SMOOTH, TerrarumGDX.getConfigBoolean("smoothlighting"))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -361,10 +358,6 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen {
|
|||||||
// app-related updates //
|
// app-related updates //
|
||||||
/////////////////////////
|
/////////////////////////
|
||||||
|
|
||||||
// determine if smooth lighting should be done
|
|
||||||
TerrarumGDX.setConfig("smoothlighting", KeyToggler.isOn(KEY_LIGHTMAP_SMOOTH))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** RENDER CODE GOES HERE */
|
/** RENDER CODE GOES HERE */
|
||||||
renderGame(batch)
|
renderGame(batch)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user