i was dealing with wrong function xD

This commit is contained in:
minjaesong
2021-03-16 10:35:35 +09:00
parent 00298190a4
commit 8f5a89e415
3 changed files with 7 additions and 7 deletions

View File

@@ -23,8 +23,8 @@ class UIItemInventoryCatBar(
initialY: Int,
uiInternalWidth: Int,
override val width: Int,
val transitionReqFun: (Int) -> Unit,
val showSideButtons: Boolean
val showSideButtons: Boolean = false,
val panelTransitionReqFun: (Int) -> Unit = {} // for side buttons; for the selection change, override selectionChangeListener
) : UIItem(parentUI, initialX, initialY) {
companion object {
@@ -242,7 +242,7 @@ class UIItemInventoryCatBar(
if (transitionFired) {
transitionFired = false
transitionReqFun(selectedPanel)
panelTransitionReqFun(selectedPanel)
}
}
}

View File

@@ -76,9 +76,9 @@ internal object UIStorageChest : UICanvas(), HasInventory {
50,
500,
500,
{ itemList.rebuild(catBar.catIconsMeaning[catBar.selectedIcon]) },
false
)
catBar.selectionChangeListener = { old, new -> itemListUpdate() }
itemList = UIItemInventoryItemGrid(
this,
catBar,
@@ -86,7 +86,7 @@ internal object UIStorageChest : UICanvas(), HasInventory {
100,
100,
4, 5,
drawScrollOnRightside = true,
drawScrollOnRightside = false,
drawWallet = true,
keyDownFun = { _,_ -> Unit },
touchDownFun = { _,_,_,_,_ -> itemListUpdate() }

View File

@@ -91,8 +91,8 @@ class UIInventoryFull(
42 + (AppLoader.screenH - internalHeight) / 2,
internalWidth,
catBarWidth,
{ i -> requestTransition(i) },
true
true,
{ i -> requestTransition(i) }
)