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