some locale changes; remoCon changes on load menu

This commit is contained in:
minjaesong
2023-08-08 17:44:23 +09:00
parent 88d844cc09
commit c0c98c3b80
13 changed files with 84 additions and 57 deletions

View File

@@ -24,7 +24,7 @@ class FixtureTypewriter : FixtureBase {
// constructor used when the game loads from the savefile
constructor() : super(
BlockBox(BlockBox.NO_COLLISION, 1, 1),
nameFun = { Lang["GAME_ITEM_TYPEWRITER"] }
nameFun = { Lang["ITEM_TYPEWRITER"] }
) {
density = 2000.0

View File

@@ -14,7 +14,7 @@ class FixtureWallCalendar : FixtureBase {
constructor() : super(
BlockBox(BlockBox.NO_COLLISION, 1, 1),
nameFun = { Lang["GAME_ITEM_CALENDAR"] }
nameFun = { Lang["ITEM_CALENDAR"] }
) {
val itemImage = FixtureItemBase.getItemImageFromSingleImage("basegame", "sprites/fixtures/calendar.tga")

View File

@@ -11,7 +11,7 @@ import net.torvald.terrarum.modulebasegame.gameactors.FixtureTikiTorch
class ItemTypewriter(originalID: ItemID) : FixtureItemBase(originalID, "net.torvald.terrarum.modulebasegame.gameactors.FixtureTypewriter") {
override var dynamicID: ItemID = originalID
override val originalName = "GAME_ITEM_TYPEWRITER"
override val originalName = "ITEM_TYPEWRITER"
override var baseMass = FixtureTikiTorch.MASS
override var stackable = true
override var inventoryCategory = Category.MISC

View File

@@ -10,7 +10,7 @@ import net.torvald.terrarum.gameitems.ItemID
class ItemWallCalendar(originalID: ItemID) : FixtureItemBase(originalID, "net.torvald.terrarum.modulebasegame.gameactors.FixtureWallCalendar") {
override var dynamicID: ItemID = originalID
override val originalName = "GAME_ITEM_CALENDAR"
override val originalName = "ITEM_CALENDAR"
override var baseMass = 1.0
override var stackable = true
override var inventoryCategory = Category.MISC

View File

@@ -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())
}
}

View File

@@ -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() {

View File

@@ -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) =