mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
default ui open/close transition is now quick-fade
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user