mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
F4 to hide GUI
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package net.torvald.terrarum
|
||||
|
||||
import com.badlogic.gdx.Input
|
||||
import com.badlogic.gdx.utils.Disposable
|
||||
import com.badlogic.gdx.utils.GdxRuntimeException
|
||||
import net.torvald.terrarum.App.printdbg
|
||||
@@ -9,6 +10,7 @@ import net.torvald.terrarum.gameactors.ActorID
|
||||
import net.torvald.terrarum.gameactors.ActorWithBody
|
||||
import net.torvald.terrarum.gameactors.ActorWithBody.Companion.PHYS_EPSILON_DIST
|
||||
import net.torvald.terrarum.gameactors.BlockMarkerActor
|
||||
import net.torvald.terrarum.gamecontroller.KeyToggler
|
||||
import net.torvald.terrarum.gamecontroller.TerrarumKeyboardEvent
|
||||
import net.torvald.terrarum.gameitems.ItemID
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
@@ -165,6 +167,7 @@ open class IngameInstance(val batch: FlippingSpriteBatch, val isMultiplayer: Boo
|
||||
|
||||
override fun show() {
|
||||
// the very basic show() implementation
|
||||
KeyToggler.forceSet(Input.Keys.F4, false)
|
||||
|
||||
// add blockmarking_actor into the actorlist
|
||||
(CommonResourcePool.get("blockmarking_actor") as BlockMarkerActor).let {
|
||||
|
||||
@@ -67,7 +67,7 @@ basegame
|
||||
// Commit counts up to the Release 0.3.1: 2278
|
||||
// Commit counts up to the Release 0.3.2: 2732
|
||||
|
||||
const val VERSION_TAG: String = "test002"
|
||||
const val VERSION_TAG: String = "test003"
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
// CONFIGURATION FOR TILE MAKER //
|
||||
|
||||
@@ -391,8 +391,10 @@ object IngameRenderer : Disposable {
|
||||
batch.shader = null
|
||||
batch.color = Color.WHITE
|
||||
|
||||
uiContainer?.forEach {
|
||||
it?.render(batch, camera)
|
||||
if (!KeyToggler.isOn(Input.Keys.F4)) {
|
||||
uiContainer?.forEach {
|
||||
it?.render(batch, camera)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -258,6 +258,8 @@ class TitleScreen(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
override fun show() {
|
||||
printdbg(this, "show() called")
|
||||
|
||||
KeyToggler.forceSet(Input.Keys.F4, false)
|
||||
|
||||
initViewPort(App.scr.width, App.scr.height)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user