mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 02:24:05 +09:00
fixed a bug where inventory's cat icons would unloaded when you load the ingame second time
This commit is contained in:
@@ -76,7 +76,7 @@ class UIInventoryFull(
|
||||
|
||||
init {
|
||||
handler.allowESCtoClose = true
|
||||
CommonResourcePool.addToLoadingList("inventory_caticons") {
|
||||
CommonResourcePool.addToLoadingList("inventory_category") {
|
||||
TextureRegionPack("./assets/graphics/gui/inventory/category.tga", 20, 20)
|
||||
}
|
||||
CommonResourcePool.loadAll()
|
||||
|
||||
@@ -50,7 +50,7 @@ class UIItemInventoryEquippedView(
|
||||
|
||||
val spriteViewBackCol: Color = CELLCOLOUR_BLACK
|
||||
|
||||
private val equipPosIcon = CommonResourcePool.getAsTextureRegionPack("inventory_caticons")
|
||||
private val equipPosIcon = CommonResourcePool.getAsTextureRegionPack("inventory_category")
|
||||
private val cellToIcon = intArrayOf(0,1,2,3,4,5,6,7,6,7,6,7)
|
||||
private val equipPosIconCol = Color(0xdddddd7f.toInt())
|
||||
|
||||
@@ -150,7 +150,7 @@ class UIItemInventoryEquippedView(
|
||||
|
||||
override fun dispose() {
|
||||
itemGrid.forEach { it.dispose() }
|
||||
equipPosIcon.dispose()
|
||||
// equipPosIcon.dispose() // disposed of by the AppLoader
|
||||
}
|
||||
|
||||
override fun touchDown(screenX: Int, screenY: Int, pointer: Int, button: Int): Boolean {
|
||||
|
||||
@@ -478,13 +478,7 @@ class UIItemInventoryItemGrid(
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
itemList.forEach { it.dispose() }
|
||||
itemGrid.forEach { it.dispose() }
|
||||
// the icons are using common resources that are disposed when the app quits
|
||||
//gridModeButtons.forEach { it.dispose() }
|
||||
//scrollUpButton.dispose()
|
||||
//scrollDownButton.dispose()
|
||||
//walletFont.dispose()
|
||||
|
||||
}
|
||||
|
||||
override fun touchDown(screenX: Int, screenY: Int, pointer: Int, button: Int): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user