Work on inventory selection list

This commit is contained in:
2022-12-25 19:00:19 +00:00
parent b01a9f89e6
commit 2ae7f2bbc1
5 changed files with 74 additions and 65 deletions
+2 -4
View File
@@ -85,7 +85,7 @@ subInvSelectionList = SelectionList
inventorySelectionList :: World -> [SelectionItem ()]
inventorySelectionList w = map (invSelectionItem cr) (IM.toList inv)
++ [SelectionItem displayFreeSlots 1 False (length thetext) white 0 ()]
++ [SelectionItem displayFreeSlots 1 True (length thetext) invDimColor 2 ()]
++ map (closeObjectToSelectionItem nfreeslots) (w ^. cWorld . lWorld . closeObjects)
where
cr = you w
@@ -312,7 +312,7 @@ topCursorTypeWidth ::
Int ->
Picture
topCursorTypeWidth ctype width cfig w i =
ctype 0 0 cfig (selNumPos i w) (selNumCol i w) width (selNumSlots i w)
ctype 0 0 cfig (selNumPos i w) (selNumCol i w) width (invSelSize i w)
determineInvSelCursorWidth :: World -> Int
determineInvSelCursorWidth w = case _rbOptions w of
@@ -355,8 +355,6 @@ invHead cfig s =
. scale 0.4 0.4
$ text s
invDimColor :: Color
invDimColor = greyN 0.7
closeObjectToSelectionItem :: Int -> Either FloorItem Button -> SelectionItem ()
closeObjectToSelectionItem n e = SelectionItem