working inventory clicking ingame

This commit is contained in:
Song Minjae
2017-04-10 01:35:28 +09:00
parent 12015669c6
commit d33d25f384
6 changed files with 30 additions and 12 deletions

View File

@@ -105,10 +105,11 @@ class UIInventory(
override fun update(gc: GameContainer, delta: Int) {
catButtons.update(gc, delta)
if (actor != null && inventory != null) {
// monitor and check if category selection has been changed
if (oldCatSelect != catButtons.selectedIndex) {
// OR UI is being opened from closed state
if (oldCatSelect != catButtons.selectedIndex ||
!rebuildList && handler!!.openFired) {
rebuildList = true
}