Cleanup, stop rboptions extending into examine inventory

This commit is contained in:
2022-12-31 12:25:29 +00:00
parent 828c4d9c5b
commit 67a13c1d01
2 changed files with 9 additions and 7 deletions
+3 -2
View File
@@ -69,7 +69,7 @@ defaultSubInvSelectionList =
invDisplayParams :: World -> ListDisplayParams
invDisplayParams w =
defaultListDisplayParams
& ldpWidth .~ FixedSelectionWidth topInvW
-- & ldpWidth .~ FixedSelectionWidth topInvW
& ldpCursorType .~ BorderCursor selcursortype
& ldpWidth .~ FixedSelectionWidth (determineInvSelCursorWidth w)
where
@@ -294,7 +294,8 @@ determineInvSelCursorWidth :: World -> Int
determineInvSelCursorWidth w = case _rbOptions w of
NoRightButtonOptions -> topInvW
EquipOptions{}
| ButtonRight `M.member` _mouseButtons (_input w) -> 47
| ButtonRight `M.member` _mouseButtons (_input w)
&& w ^? hud . hudElement . subInventory == Just NoSubInventory -> 47
| otherwise -> topInvW
combineListSelection :: World -> Maybe Int -> SelectionList ()