default ui open/close transition is now quick-fade

This commit is contained in:
minjaesong
2023-01-06 18:57:18 +09:00
parent 53dee515fe
commit 02bdb2a4fc
22 changed files with 141 additions and 246 deletions

View File

@@ -77,7 +77,6 @@ internal class UIStorageChest : UICanvas(
override var width = App.scr.width
override var height = App.scr.height
override var openCloseTime: Second = 0.0f
private val negotiator = object : InventoryTransactionNegotiator() {
override fun accept(player: FixtureInventory, fixture: FixtureInventory, item: GameItem, amount: Long) {
@@ -227,7 +226,7 @@ internal class UIStorageChest : UICanvas(
override fun renderUI(batch: SpriteBatch, camera: Camera) {
// background fill
UIInventoryFull.drawBackground(batch)
UIInventoryFull.drawBackground(batch, handler.opacity)
// UI items
batch.color = Color.WHITE

View File

@@ -33,7 +33,6 @@ class UICrafting(val full: UIInventoryFull) : UICanvas(), HasInventory {
override var width = App.scr.width
override var height = App.scr.height
override var openCloseTime: Second = 0.0f
private val itemListPlayer: UIItemInventoryItemGrid
private val itemListCraftable: UIItemCraftingCandidateGrid // might be changed to something else
@@ -515,21 +514,24 @@ class UICrafting(val full: UIInventoryFull) : UICanvas(), HasInventory {
}
override fun doOpening(delta: Float) {
super.doOpening(delta)
resetUI()
INGAME.setTooltipMessage(null)
}
override fun doClosing(delta: Float) {
super.doClosing(delta)
INGAME.setTooltipMessage(null)
}
override fun endOpening(delta: Float) {
super.endOpening(delta)
UIItemInventoryItemGrid.tooltipShowing.clear()
INGAME.setTooltipMessage(null) // required!
}
override fun endClosing(delta: Float) {
super.endClosing(delta)
resetUI()
UIItemInventoryItemGrid.tooltipShowing.clear()
INGAME.setTooltipMessage(null) // required!