From 0881d1dca311a05d9ae2dc4c6da232947ae94f80 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Wed, 10 Jan 2024 17:03:34 +0900 Subject: [PATCH] catbar: better parameter comments --- src/net/torvald/terrarum/ui/UIItemCatBar.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net/torvald/terrarum/ui/UIItemCatBar.kt b/src/net/torvald/terrarum/ui/UIItemCatBar.kt index 6b69b7c02..24b4e1c9d 100644 --- a/src/net/torvald/terrarum/ui/UIItemCatBar.kt +++ b/src/net/torvald/terrarum/ui/UIItemCatBar.kt @@ -18,8 +18,9 @@ class UIItemCatBar( val showSideButtons: Boolean = false, val catIcons: TextureRegionPack = CommonResourcePool.getAsTextureRegionPack("inventory_category"), - private val catArrangement: IntArray, // icon order - internal val catIconsMeaning: List>, // sortedBy: catArrangement + /** XY index of the icon in the `catIcons`. When the number is written in decimal, low three digits denote X-axis (index=YYYXXX in decimal). The indices are ordered so that the first element is the icon on the left in the catbar. */ + private val catArrangement: IntArray, + internal val catIconsMeaning: List>, internal val catIconsLabels: List<() -> String>, val panelTransitionReqFun: (Int) -> Unit = {} // for side buttons; for the selection change, override selectionChangeListener