From 432c90776b1f253bb672cf15103bcd0725f70741 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Sat, 13 Nov 2021 16:09:32 +0900 Subject: [PATCH] why do i need window title for these panels --- .../terrarum/modulebasegame/ui/UIKeyboardControlPanel.kt | 7 ++++--- .../terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardControlPanel.kt b/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardControlPanel.kt index 8ad7fc21e..f551c024d 100644 --- a/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardControlPanel.kt +++ b/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardControlPanel.kt @@ -226,9 +226,10 @@ class UIKeyboardControlPanel(remoCon: UIRemoCon?) : UICanvas() { } // title - val title = Lang["MENU_OPTIONS_CONTROLS"] - batch.color = Color.WHITE - App.fontGame.draw(batch, title, drawX.toFloat() + (width - App.fontGame.getWidth(title)) / 2, drawY.toFloat()) + // TODO display window "title" using text spinner ONLY WHEN gamepad config is also supported +// val title = Lang["MENU_OPTIONS_CONTROLS"] +// batch.color = Color.WHITE +// App.fontGame.draw(batch, title, drawX.toFloat() + (width - App.fontGame.getWidth(title)) / 2, drawY.toFloat()) } diff --git a/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt b/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt index 38bacaee4..3a8b91a30 100644 --- a/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt +++ b/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt @@ -181,10 +181,11 @@ class UIKeyboardInputConfig(remoCon: UIRemoCon?) : UICanvas() { App.fontGame.draw(batch, txt2, selDrawX + halfselw + (halfselw - tw2) / 2, y1) // title - val title = Lang["MENU_CONTROLS_KEYBOARD"] - batch.color = Color.WHITE - App.fontGame.draw(batch, title, drawX.toFloat() + (width - App.fontGame.getWidth(title)) / 2, drawY.toFloat()) + // TODO only when text input using gamepad is supported, and even then, use text spinner +// val title = Lang["MENU_CONTROLS_KEYBOARD"] +// App.fontGame.draw(batch, title, drawX.toFloat() + (width - App.fontGame.getWidth(title)) / 2, drawY.toFloat()) + batch.color = Color.WHITE uiItems.forEach { it.render(batch, camera) } shiftin = Gdx.input.isKeyPressed(Input.Keys.SHIFT_LEFT) || Gdx.input.isKeyPressed(Input.Keys.SHIFT_RIGHT)