mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 10:04:05 +09:00
fixed a bug where fullscreen inventory ui would errenously unpause the game
This commit is contained in:
@@ -138,7 +138,7 @@ internal class UIStorageChest : UICanvas(
|
|||||||
{ INGAME.actorNowPlaying!!.inventory }, // literally a player's inventory
|
{ INGAME.actorNowPlaying!!.inventory }, // literally a player's inventory
|
||||||
INVENTORY_CELLS_OFFSET_X() - halfSlotOffset + (listGap + UIItemInventoryElemWide.height) * 7,
|
INVENTORY_CELLS_OFFSET_X() - halfSlotOffset + (listGap + UIItemInventoryElemWide.height) * 7,
|
||||||
INVENTORY_CELLS_OFFSET_Y(),
|
INVENTORY_CELLS_OFFSET_Y(),
|
||||||
6, CELLS_VRT - 1,
|
6, CELLS_VRT,
|
||||||
drawScrollOnRightside = true,
|
drawScrollOnRightside = true,
|
||||||
drawWallet = false,
|
drawWallet = false,
|
||||||
keyDownFun = { _, _, _ -> Unit },
|
keyDownFun = { _, _, _ -> Unit },
|
||||||
@@ -211,6 +211,10 @@ internal class UIStorageChest : UICanvas(
|
|||||||
if (openingClickLatched && !Terrarum.mouseDown) openingClickLatched = false
|
if (openingClickLatched && !Terrarum.mouseDown) openingClickLatched = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private val thisOffsetX = UIInventoryFull.INVENTORY_CELLS_OFFSET_X() - halfSlotOffset
|
||||||
|
private val thisOffsetX2 = thisOffsetX + (listGap + UIItemInventoryElemWide.height) * 7
|
||||||
|
private val thisOffsetY = UIInventoryFull.INVENTORY_CELLS_OFFSET_Y()
|
||||||
|
|
||||||
override fun renderUI(batch: SpriteBatch, camera: Camera) {
|
override fun renderUI(batch: SpriteBatch, camera: Camera) {
|
||||||
// background fill
|
// background fill
|
||||||
UIInventoryFull.drawBackground(batch)
|
UIInventoryFull.drawBackground(batch)
|
||||||
@@ -255,7 +259,9 @@ internal class UIStorageChest : UICanvas(
|
|||||||
|
|
||||||
// chest name text
|
// chest name text
|
||||||
batch.color = Color.WHITE
|
batch.color = Color.WHITE
|
||||||
App.fontGame.draw(batch, chestName, chestNameXpos, encumbBarYPos - 3f)
|
App.fontGame.draw(batch, chestName, thisOffsetX + 2, thisOffsetY - 30)
|
||||||
|
App.fontGame.draw(batch, Lang["GAME_INVENTORY"], thisOffsetX2 + 2, thisOffsetY - 30)
|
||||||
|
|
||||||
// encumb text
|
// encumb text
|
||||||
batch.color = Color.WHITE
|
batch.color = Color.WHITE
|
||||||
App.fontGame.draw(batch, encumbranceText, encumbBarTextXPos, encumbBarYPos - 3f +
|
App.fontGame.draw(batch, encumbranceText, encumbBarTextXPos, encumbBarYPos - 3f +
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import net.torvald.terrarum.App.printdbg
|
|||||||
import net.torvald.terrarum.gameitems.GameItem
|
import net.torvald.terrarum.gameitems.GameItem
|
||||||
import net.torvald.terrarum.langpack.Lang
|
import net.torvald.terrarum.langpack.Lang
|
||||||
import net.torvald.terrarum.modulebasegame.ui.*
|
import net.torvald.terrarum.modulebasegame.ui.*
|
||||||
import net.torvald.terrarum.modulebasegame.ui.UIInventoryCells
|
|
||||||
import net.torvald.terrarum.modulebasegame.ui.UIItemInventoryItemGrid.Companion.listGap
|
import net.torvald.terrarum.modulebasegame.ui.UIItemInventoryItemGrid.Companion.listGap
|
||||||
import net.torvald.terrarum.ui.Toolkit
|
import net.torvald.terrarum.ui.Toolkit
|
||||||
import net.torvald.terrarum.ui.UICanvas
|
import net.torvald.terrarum.ui.UICanvas
|
||||||
@@ -246,12 +245,12 @@ class UICrafting(val full: UIInventoryFull) : UICanvas(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun doOpening(delta: Float) {
|
override fun doOpening(delta: Float) {
|
||||||
INGAME.pause()
|
// INGAME.pause()
|
||||||
INGAME.setTooltipMessage(null)
|
INGAME.setTooltipMessage(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun doClosing(delta: Float) {
|
override fun doClosing(delta: Float) {
|
||||||
INGAME.resume()
|
// INGAME.resume()
|
||||||
INGAME.setTooltipMessage(null)
|
INGAME.setTooltipMessage(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user