mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 02:54:04 +09:00
titlescreen continue/load wont appear if there are no savegames available
This commit is contained in:
@@ -366,6 +366,7 @@ public class App implements ApplicationListener {
|
|||||||
|
|
||||||
CommonResourcePool.INSTANCE.addToLoadingList("blockmarkings_common", () -> new TextureRegionPack(Gdx.files.internal("assets/graphics/blocks/block_markings_common.tga"), 16, 16, 0, 0, 0, 0, false));
|
CommonResourcePool.INSTANCE.addToLoadingList("blockmarkings_common", () -> new TextureRegionPack(Gdx.files.internal("assets/graphics/blocks/block_markings_common.tga"), 16, 16, 0, 0, 0, 0, false));
|
||||||
CommonResourcePool.INSTANCE.addToLoadingList("blockmarking_actor", () -> new BlockMarkerActor());
|
CommonResourcePool.INSTANCE.addToLoadingList("blockmarking_actor", () -> new BlockMarkerActor());
|
||||||
|
CommonResourcePool.INSTANCE.addToLoadingList("loading_circle_64", () -> new TextureRegionPack(Gdx.files.internal("assets/graphics/gui/loading_circle_64.tga"), 64, 64, 0, 0, 0, 0, false));
|
||||||
|
|
||||||
newTempFile("wenquanyi.tga"); // temp file required by the font
|
newTempFile("wenquanyi.tga"); // temp file required by the font
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class TitleScreen(batch: SpriteBatch) : IngameInstance(batch) {
|
|||||||
uiContainer.add(uiFakeBlurOverlay)
|
uiContainer.add(uiFakeBlurOverlay)
|
||||||
|
|
||||||
|
|
||||||
uiMenu = UIRemoCon(this, UITitleRemoConYaml())//UITitleRemoConRoot()
|
uiMenu = UIRemoCon(this, UITitleRemoConYaml(App.savegames.isNotEmpty()))
|
||||||
uiMenu.setPosition(0, 0)
|
uiMenu.setPosition(0, 0)
|
||||||
uiMenu.setAsOpen()
|
uiMenu.setAsOpen()
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package net.torvald.terrarum.modulebasegame.ui
|
package net.torvald.terrarum.modulebasegame.ui
|
||||||
|
|
||||||
import net.torvald.terrarum.App
|
|
||||||
import net.torvald.terrarum.Yaml
|
import net.torvald.terrarum.Yaml
|
||||||
|
|
||||||
|
|
||||||
@@ -12,38 +11,37 @@ object UITitleRemoConYaml {
|
|||||||
*
|
*
|
||||||
* The class must be the UICanvas
|
* The class must be the UICanvas
|
||||||
*/
|
*/
|
||||||
val menus = """
|
private val menuBase = """
|
||||||
- MENU_LABEL_CONTINUE : net.torvald.terrarum.modulebasegame.ui.UIProxyLoadLatestSave
|
- MENU_OPTIONS
|
||||||
- MENU_LABEL_NEW_GAME : net.torvald.terrarum.modulebasegame.ui.UIProxyNewRandomGame
|
- MENU_OPTIONS_GRAPHICS
|
||||||
- MENU_IO_LOAD : net.torvald.terrarum.modulebasegame.ui.UILoadDemoSavefiles
|
- MENU_OPTIONS_CONTROLS
|
||||||
- MENU_LABEL_RETURN
|
- MENU_CONTROLS_KEYBOARD
|
||||||
- MENU_OPTIONS
|
- MENU_CONTROLS_GAMEPAD
|
||||||
- MENU_OPTIONS_GRAPHICS
|
- MENU_LABEL_RETURN
|
||||||
- MENU_OPTIONS_CONTROLS
|
- MENU_OPTIONS_SOUND
|
||||||
- MENU_CONTROLS_KEYBOARD
|
- MENU_LABEL_LANGUAGE : net.torvald.terrarum.modulebasegame.ui.UITitleLanguage
|
||||||
- MENU_CONTROLS_GAMEPAD
|
- MENU_MODULES : net.torvald.terrarum.ModOptionsHost
|
||||||
- MENU_LABEL_RETURN
|
- MENU_LABEL_RETURN
|
||||||
- MENU_OPTIONS_SOUND
|
- MENU_LABEL_CREDITS : net.torvald.terrarum.modulebasegame.ui.UITitleCredits
|
||||||
- MENU_LABEL_LANGUAGE : net.torvald.terrarum.modulebasegame.ui.UITitleLanguage
|
- MENU_LABEL_CREDITS : net.torvald.terrarum.modulebasegame.ui.UITitleCredits
|
||||||
- MENU_MODULES : net.torvald.terrarum.ModOptionsHost
|
- MENU_CREDIT_GPL_DNT : net.torvald.terrarum.modulebasegame.ui.UITitleGPL3
|
||||||
- MENU_LABEL_RETURN
|
- MENU_LABEL_RETURN
|
||||||
- MENU_LABEL_CREDITS : net.torvald.terrarum.modulebasegame.ui.UITitleCredits
|
- MENU_LABEL_QUIT
|
||||||
- MENU_LABEL_CREDITS : net.torvald.terrarum.modulebasegame.ui.UITitleCredits
|
"""
|
||||||
- MENU_CREDIT_GPL_DNT : net.torvald.terrarum.modulebasegame.ui.UITitleGPL3
|
|
||||||
- MENU_LABEL_RETURN
|
|
||||||
- MENU_LABEL_QUIT
|
|
||||||
""".trimIndent()
|
|
||||||
|
|
||||||
val debugTools = "" /*"""
|
private val menuWithSavefile = """
|
||||||
- Development Tools $
|
- MENU_LABEL_CONTINUE : net.torvald.terrarum.modulebasegame.ui.UIProxyLoadLatestSave
|
||||||
- Building Maker : net.torvald.terrarum.modulebasegame.ui.UIProxyNewBuildingMaker
|
- MENU_LABEL_NEW_GAME : net.torvald.terrarum.modulebasegame.ui.UIProxyNewRandomGame
|
||||||
- Start New Random Game : net.torvald.terrarum.modulebasegame.ui.UIProxyNewRandomGame
|
- MENU_IO_LOAD : net.torvald.terrarum.modulebasegame.ui.UILoadDemoSavefiles
|
||||||
- MENU_LABEL_RETURN
|
- MENU_LABEL_RETURN
|
||||||
""".trimIndent()*/
|
"""
|
||||||
|
|
||||||
operator fun invoke() = if (App.IS_DEVELOPMENT_BUILD)
|
private val menuNewGame = """
|
||||||
Yaml(menus + "\n" + debugTools).parse()
|
- MENU_LABEL_NEW_GAME : net.torvald.terrarum.modulebasegame.ui.UIProxyNewRandomGame
|
||||||
else
|
"""
|
||||||
Yaml(menus).parse()
|
|
||||||
|
|
||||||
|
operator fun invoke(hasSave: Boolean) =
|
||||||
|
Yaml((if (hasSave) menuWithSavefile else menuNewGame) + menuBase).parse()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user