mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-16 16:46:07 +09:00
i was dealing with wrong function xD
This commit is contained in:
@@ -23,8 +23,8 @@ class UIItemInventoryCatBar(
|
|||||||
initialY: Int,
|
initialY: Int,
|
||||||
uiInternalWidth: Int,
|
uiInternalWidth: Int,
|
||||||
override val width: Int,
|
override val width: Int,
|
||||||
val transitionReqFun: (Int) -> Unit,
|
val showSideButtons: Boolean = false,
|
||||||
val showSideButtons: Boolean
|
val panelTransitionReqFun: (Int) -> Unit = {} // for side buttons; for the selection change, override selectionChangeListener
|
||||||
) : UIItem(parentUI, initialX, initialY) {
|
) : UIItem(parentUI, initialX, initialY) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@@ -242,7 +242,7 @@ class UIItemInventoryCatBar(
|
|||||||
|
|
||||||
if (transitionFired) {
|
if (transitionFired) {
|
||||||
transitionFired = false
|
transitionFired = false
|
||||||
transitionReqFun(selectedPanel)
|
panelTransitionReqFun(selectedPanel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,9 +76,9 @@ internal object UIStorageChest : UICanvas(), HasInventory {
|
|||||||
50,
|
50,
|
||||||
500,
|
500,
|
||||||
500,
|
500,
|
||||||
{ itemList.rebuild(catBar.catIconsMeaning[catBar.selectedIcon]) },
|
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
catBar.selectionChangeListener = { old, new -> itemListUpdate() }
|
||||||
itemList = UIItemInventoryItemGrid(
|
itemList = UIItemInventoryItemGrid(
|
||||||
this,
|
this,
|
||||||
catBar,
|
catBar,
|
||||||
@@ -86,7 +86,7 @@ internal object UIStorageChest : UICanvas(), HasInventory {
|
|||||||
100,
|
100,
|
||||||
100,
|
100,
|
||||||
4, 5,
|
4, 5,
|
||||||
drawScrollOnRightside = true,
|
drawScrollOnRightside = false,
|
||||||
drawWallet = true,
|
drawWallet = true,
|
||||||
keyDownFun = { _,_ -> Unit },
|
keyDownFun = { _,_ -> Unit },
|
||||||
touchDownFun = { _,_,_,_,_ -> itemListUpdate() }
|
touchDownFun = { _,_,_,_,_ -> itemListUpdate() }
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ class UIInventoryFull(
|
|||||||
42 + (AppLoader.screenH - internalHeight) / 2,
|
42 + (AppLoader.screenH - internalHeight) / 2,
|
||||||
internalWidth,
|
internalWidth,
|
||||||
catBarWidth,
|
catBarWidth,
|
||||||
{ i -> requestTransition(i) },
|
true,
|
||||||
true
|
{ i -> requestTransition(i) }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user