mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44: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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user