mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
titlescreen continue/load wont appear if there are no savegames available
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package net.torvald.terrarum.modulebasegame.ui
|
||||
|
||||
import net.torvald.terrarum.App
|
||||
import net.torvald.terrarum.Yaml
|
||||
|
||||
|
||||
@@ -12,38 +11,37 @@ object UITitleRemoConYaml {
|
||||
*
|
||||
* The class must be the UICanvas
|
||||
*/
|
||||
val menus = """
|
||||
- MENU_LABEL_CONTINUE : net.torvald.terrarum.modulebasegame.ui.UIProxyLoadLatestSave
|
||||
- MENU_LABEL_NEW_GAME : net.torvald.terrarum.modulebasegame.ui.UIProxyNewRandomGame
|
||||
- MENU_IO_LOAD : net.torvald.terrarum.modulebasegame.ui.UILoadDemoSavefiles
|
||||
- MENU_LABEL_RETURN
|
||||
- MENU_OPTIONS
|
||||
- MENU_OPTIONS_GRAPHICS
|
||||
- MENU_OPTIONS_CONTROLS
|
||||
- MENU_CONTROLS_KEYBOARD
|
||||
- MENU_CONTROLS_GAMEPAD
|
||||
- MENU_LABEL_RETURN
|
||||
- MENU_OPTIONS_SOUND
|
||||
- MENU_LABEL_LANGUAGE : net.torvald.terrarum.modulebasegame.ui.UITitleLanguage
|
||||
- MENU_MODULES : net.torvald.terrarum.ModOptionsHost
|
||||
- MENU_LABEL_RETURN
|
||||
- MENU_LABEL_CREDITS : net.torvald.terrarum.modulebasegame.ui.UITitleCredits
|
||||
- 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()
|
||||
private val menuBase = """
|
||||
- MENU_OPTIONS
|
||||
- MENU_OPTIONS_GRAPHICS
|
||||
- MENU_OPTIONS_CONTROLS
|
||||
- MENU_CONTROLS_KEYBOARD
|
||||
- MENU_CONTROLS_GAMEPAD
|
||||
- MENU_LABEL_RETURN
|
||||
- MENU_OPTIONS_SOUND
|
||||
- MENU_LABEL_LANGUAGE : net.torvald.terrarum.modulebasegame.ui.UITitleLanguage
|
||||
- MENU_MODULES : net.torvald.terrarum.ModOptionsHost
|
||||
- MENU_LABEL_RETURN
|
||||
- MENU_LABEL_CREDITS : net.torvald.terrarum.modulebasegame.ui.UITitleCredits
|
||||
- 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
|
||||
"""
|
||||
|
||||
val debugTools = "" /*"""
|
||||
- Development Tools $
|
||||
- Building Maker : net.torvald.terrarum.modulebasegame.ui.UIProxyNewBuildingMaker
|
||||
- Start New Random Game : net.torvald.terrarum.modulebasegame.ui.UIProxyNewRandomGame
|
||||
- MENU_LABEL_RETURN
|
||||
""".trimIndent()*/
|
||||
private val menuWithSavefile = """
|
||||
- MENU_LABEL_CONTINUE : net.torvald.terrarum.modulebasegame.ui.UIProxyLoadLatestSave
|
||||
- MENU_LABEL_NEW_GAME : net.torvald.terrarum.modulebasegame.ui.UIProxyNewRandomGame
|
||||
- MENU_IO_LOAD : net.torvald.terrarum.modulebasegame.ui.UILoadDemoSavefiles
|
||||
- MENU_LABEL_RETURN
|
||||
"""
|
||||
|
||||
operator fun invoke() = if (App.IS_DEVELOPMENT_BUILD)
|
||||
Yaml(menus + "\n" + debugTools).parse()
|
||||
else
|
||||
Yaml(menus).parse()
|
||||
private val menuNewGame = """
|
||||
- MENU_LABEL_NEW_GAME : net.torvald.terrarum.modulebasegame.ui.UIProxyNewRandomGame
|
||||
"""
|
||||
|
||||
|
||||
operator fun invoke(hasSave: Boolean) =
|
||||
Yaml((if (hasSave) menuWithSavefile else menuNewGame) + menuBase).parse()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user