diff --git a/assets/mods/basegame/locales/en/items.json b/assets/mods/basegame/locales/en/items.json new file mode 100644 index 000000000..3d8f55801 --- /dev/null +++ b/assets/mods/basegame/locales/en/items.json @@ -0,0 +1,3 @@ +{ + "ITEM_STORAGE_CHEST": "Storage Chest" +} \ No newline at end of file diff --git a/assets/mods/basegame/locales/koKR/items.json b/assets/mods/basegame/locales/koKR/items.json new file mode 100644 index 000000000..5a69f98fb --- /dev/null +++ b/assets/mods/basegame/locales/koKR/items.json @@ -0,0 +1,3 @@ +{ + "ITEM_STORAGE_CHEST": "보관상자" +} \ No newline at end of file diff --git a/src/net/torvald/terrarum/modulebasegame/gameactors/FixtureStorageChest.kt b/src/net/torvald/terrarum/modulebasegame/gameactors/FixtureStorageChest.kt index e2bbb7d92..d1814de7b 100644 --- a/src/net/torvald/terrarum/modulebasegame/gameactors/FixtureStorageChest.kt +++ b/src/net/torvald/terrarum/modulebasegame/gameactors/FixtureStorageChest.kt @@ -221,19 +221,14 @@ internal class UIStorageChest : UICanvas(), HasInventory { // encumbrance meter val encumbranceText = Lang["GAME_INVENTORY_ENCUMBRANCE"] - // encumbrance bar will go one row down if control help message is too long val encumbBarXPos = itemListPlayer.posX + itemListPlayer.width - weightBarWidth val encumbBarTextXPos = encumbBarXPos - 6 - AppLoader.fontGame.getWidth(encumbranceText) val encumbBarYPos = UIInventoryCells.encumbBarYPos - // encumbrance bar background val encumbCol = UIItemInventoryCellCommonRes.getHealthMeterColour(1f - encumbrancePerc, 0f, 1f) val encumbBack = encumbCol mul UIItemInventoryCellCommonRes.meterBackDarkening + val chestName = chestNameFun() - batch.color = Color.WHITE - // encumb text - AppLoader.fontGame.draw(batch, encumbranceText, encumbBarTextXPos, encumbBarYPos - 3f) - // chest name text - AppLoader.fontGame.draw(batch, chestNameFun(), itemListChest.posX + 6f, encumbBarYPos - 3f) + // encumbrance bar background batch.color = encumbBack batch.fillRect( encumbBarXPos, encumbBarYPos, @@ -249,6 +244,13 @@ internal class UIStorageChest : UICanvas(), HasInventory { minOf(weightBarWidth, maxOf(1f, weightBarWidth * encumbrancePerc)), controlHelpHeight - 6f ) + + // chest name text + batch.color = Color.WHITE + AppLoader.fontGame.draw(batch, chestName, itemListChest.posX + 6f, encumbBarYPos - 3f) + // encumb text + batch.color = Color.WHITE + AppLoader.fontGame.draw(batch, encumbranceText, encumbBarTextXPos, encumbBarYPos - 3f) } override fun doOpening(delta: Float) {