mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
F12 for screenshot; it's high time to care about TVs
(besides, the EBU gap is also a good guideline for placing UIs on edge)
This commit is contained in:
@@ -68,6 +68,8 @@ class IngameController(val ingame: Ingame) : InputAdapter() {
|
||||
/////////////////////
|
||||
}
|
||||
|
||||
private var f12Down = false
|
||||
|
||||
override fun keyDown(keycode: Int): Boolean {
|
||||
|
||||
if (ingame.canPlayerControl) {
|
||||
@@ -98,6 +100,15 @@ class IngameController(val ingame: Ingame) : InputAdapter() {
|
||||
}
|
||||
|
||||
|
||||
// screenshot key
|
||||
if (keycode == Input.Keys.F12 && !f12Down) {
|
||||
AppLoader.requestScreenshot()
|
||||
// FIXME
|
||||
//ingame.sendNotification(arrayOf("Screenshot taken", ""))
|
||||
f12Down = true
|
||||
println("Screenshot taken.")
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -111,6 +122,10 @@ class IngameController(val ingame: Ingame) : InputAdapter() {
|
||||
ingame.uiContainer.forEach { it.keyUp(keycode) } // for KeyboardControlled UIcanvases
|
||||
|
||||
|
||||
// screenshot key
|
||||
if (keycode == Input.Keys.F12) f12Down = false
|
||||
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package net.torvald.terrarum.gamecontroller
|
||||
/**
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
*/
|
||||
@Deprecated("Use Gdx.Input.Keys")
|
||||
/*@Deprecated("Use Gdx.Input.Keys")
|
||||
object DeprecatedAsFuckKey {
|
||||
|
||||
val RETURN = 28
|
||||
@@ -90,4 +90,4 @@ object DeprecatedAsFuckKey {
|
||||
val PGDN = 209
|
||||
val HOME = 199
|
||||
val END = 207
|
||||
}
|
||||
}*/
|
||||
|
||||
Reference in New Issue
Block a user