mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 11:34:05 +09:00
some locale changes; remoCon changes on load menu
This commit is contained in:
@@ -235,7 +235,7 @@ class UILoadList(val full: UILoadSavegame) : UICanvas() {
|
||||
if (showSpinner) {
|
||||
val spin = spinner.get(spinnerFrame % 8, spinnerFrame / 8)
|
||||
val offX = UIRemoCon.menubarOffX - UIRemoCon.UIRemoConElement.paddingLeft + 72 + 1
|
||||
val offY = UIRemoCon.menubarOffY - UIRemoCon.UIRemoConElement.lineHeight * 3 + 16
|
||||
val offY = UIRemoCon.menubarOffY - UIRemoCon.UIRemoConElement.lineHeight * 4 + 16
|
||||
batch.draw(spin, offX.toFloat(), offY.toFloat())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,8 +90,17 @@ class UILoadSavegame(val remoCon: UIRemoCon) : Advanceable() {
|
||||
listOf(NullUI/*, transitionalAutosave*/)
|
||||
)
|
||||
|
||||
internal fun queueUpManageScr() { transitionPanel.setCentreUIto(0) }
|
||||
internal fun queueUpNewCharScr() { transitionPanel.setCentreUIto(1) }
|
||||
private val nodesForListing = Yaml(UITitleRemoConYaml.injectedMenuSingleCharSel).parse()
|
||||
private val nodesForManage = Yaml(UITitleRemoConYaml.injectedMenuSingleSaveManage).parse()
|
||||
|
||||
internal fun queueUpManageScr() {
|
||||
transitionPanel.setCentreUIto(0)
|
||||
remoCon.setNewRemoConContents(nodesForManage)
|
||||
}
|
||||
internal fun queueUpNewCharScr() {
|
||||
transitionPanel.setCentreUIto(1)
|
||||
remoCon.setNewRemoConContents(nodesForListing)
|
||||
}
|
||||
|
||||
// internal fun bringAutosaveSelectorUp() { transitionPanel.setRightUIto(1) }
|
||||
// internal fun takeAutosaveSelectorDown() { transitionPanel.setRightUIto(0) }
|
||||
@@ -102,6 +111,10 @@ class UILoadSavegame(val remoCon: UIRemoCon) : Advanceable() {
|
||||
|
||||
internal fun changePanelTo(index: Int) {
|
||||
transitionPanel.requestTransition(index)
|
||||
if (index == 1)
|
||||
remoCon.setNewRemoConContents(nodesForManage)
|
||||
else
|
||||
remoCon.setNewRemoConContents(nodesForListing)
|
||||
}
|
||||
|
||||
override fun advanceMode(button: UIItem) {
|
||||
@@ -118,6 +131,9 @@ class UILoadSavegame(val remoCon: UIRemoCon) : Advanceable() {
|
||||
// takeAutosaveSelectorDown()
|
||||
transitionPanel.show()
|
||||
|
||||
nodesForListing.parent = remoCon.treeRoot
|
||||
nodesForManage.parent = remoCon.treeRoot
|
||||
|
||||
}
|
||||
|
||||
override fun hide() {
|
||||
|
||||
@@ -41,6 +41,7 @@ object UITitleRemoConYaml {
|
||||
|
||||
// todo add MENU_IO_IMPORT
|
||||
val injectedMenuSingleCharSel = """
|
||||
- MENU_IO_IMPORT
|
||||
- CONTEXT_CHARACTER_NEW : net.torvald.terrarum.modulebasegame.ui.UINewCharacter
|
||||
- MENU_LABEL_RETURN
|
||||
"""
|
||||
@@ -48,6 +49,12 @@ object UITitleRemoConYaml {
|
||||
val injectedMenuSingleWorldSel = """
|
||||
- CONTEXT_WORLD_NEW : net.torvald.terrarum.modulebasegame.ui.UINewWorld
|
||||
- MENU_LABEL_RETURN
|
||||
"""
|
||||
|
||||
val injectedMenuSingleSaveManage = """
|
||||
- MENU_MODULES
|
||||
- MENU_LABEL_PREV_SAVES
|
||||
- MENU_LABEL_RETURN
|
||||
"""
|
||||
|
||||
operator fun invoke(hasSave: Boolean) =
|
||||
|
||||
Reference in New Issue
Block a user