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:
minjaesong
2019-01-23 03:46:46 +09:00
parent 66b18bf8c5
commit 84ca954a26
6 changed files with 58 additions and 11 deletions

View File

@@ -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
}