mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
fixd a bug where HUD will draw on top of console window
This commit is contained in:
@@ -1114,12 +1114,14 @@ public class AppLoader implements ApplicationListener {
|
|||||||
|
|
||||||
public static void printdbgerr(Object obj, Object message) {
|
public static void printdbgerr(Object obj, Object message) {
|
||||||
if (IS_DEVELOPMENT_BUILD) {
|
if (IS_DEVELOPMENT_BUILD) {
|
||||||
System.err.println("[" + obj.getClass().getSimpleName() + "] " + message.toString());
|
String out = (obj instanceof String) ? (String) obj : obj.getClass().getSimpleName();
|
||||||
|
System.err.println("[" + out + "] " + message.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void printmsg(Object obj, Object message) {
|
public static void printmsg(Object obj, Object message) {
|
||||||
System.out.println("[" + obj.getClass().getSimpleName() + "] " + message.toString());
|
String out = (obj instanceof String) ? (String) obj : obj.getClass().getSimpleName();
|
||||||
|
System.out.println("[" + out + "] " + message.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ShaderProgram loadShader(String vert, String frag) {
|
public static ShaderProgram loadShader(String vert, String frag) {
|
||||||
|
|||||||
@@ -193,7 +193,14 @@ class TitleScreen(batch: SpriteBatch) : IngameInstance(batch) {
|
|||||||
private var introUncoverDeltaCounter = 0f
|
private var introUncoverDeltaCounter = 0f
|
||||||
private var updateAkku = 0.0
|
private var updateAkku = 0.0
|
||||||
|
|
||||||
|
private var fucklatch = false
|
||||||
|
|
||||||
override fun render(updateRate: Float) {
|
override fun render(updateRate: Float) {
|
||||||
|
if (!fucklatch) {
|
||||||
|
printdbg(this, "render start")
|
||||||
|
fucklatch = true
|
||||||
|
}
|
||||||
|
|
||||||
// async update and render
|
// async update and render
|
||||||
|
|
||||||
val dt = Gdx.graphics.rawDeltaTime
|
val dt = Gdx.graphics.rawDeltaTime
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package net.torvald.terrarum.gamecontroller
|
|||||||
|
|
||||||
import com.badlogic.gdx.Gdx
|
import com.badlogic.gdx.Gdx
|
||||||
import com.badlogic.gdx.Input
|
import com.badlogic.gdx.Input
|
||||||
import net.torvald.terrarum.AppLoader.printdbg
|
|
||||||
import net.torvald.util.sortedArrayListOf
|
import net.torvald.util.sortedArrayListOf
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@@ -36,9 +35,6 @@ object KeyToggler {
|
|||||||
fun update(toggleGameKeys: Boolean) {
|
fun update(toggleGameKeys: Boolean) {
|
||||||
for (it in 0..255) {
|
for (it in 0..255) {
|
||||||
if (!toggleGameKeys && gameKeys.contains(it)) {
|
if (!toggleGameKeys && gameKeys.contains(it)) {
|
||||||
if (Gdx.input.isKeyPressed(it))
|
|
||||||
printdbg(this, "Disallowed key: $it")
|
|
||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -381,8 +381,10 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
|
|||||||
consoleHandler,
|
consoleHandler,
|
||||||
uiCheatMotherfuckerNootNoot
|
uiCheatMotherfuckerNootNoot
|
||||||
)
|
)
|
||||||
uiAliasesPausing.forEach { addUI(it) } // put them all to the UIContainer
|
// UIFixture is handled "dirtily" (calling directly from the render/update code) because it's dynamic
|
||||||
|
// Therefore, console window will be drawn behind of the thing
|
||||||
uiAliases.forEach { addUI(it) } // put them all to the UIContainer
|
uiAliases.forEach { addUI(it) } // put them all to the UIContainer
|
||||||
|
uiAliasesPausing.forEach { addUI(it) } // put them all to the UIContainer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ internal object JavaIMTest : ConsoleCommand {
|
|||||||
Echo("[TextInputText] (input canceled)")
|
Echo("[TextInputText] (input canceled)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Gdx.input.getTextInput(inputListener, "TextInputTest", "Testing the text input", "type anything!")
|
Gdx.input.getTextInput(inputListener, "TextInputTest", "", "type anything!")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun printUsage() {
|
override fun printUsage() {
|
||||||
|
|||||||
Reference in New Issue
Block a user