Work on inventory ui

This commit is contained in:
2023-05-14 22:22:21 +01:00
parent 3499384d38
commit 1cec50c5ab
9 changed files with 150 additions and 165 deletions
+7 -8
View File
@@ -33,21 +33,20 @@ invDisplayParams w =
& ldpWidth .~ FixedSelectionWidth (determineInvSelCursorWidth w)
& ldpPos . spPixelOff .~ V2 6 (-1)
where
selcursortype
| isexaminesub || ButtonRight `M.member` _mouseButtons (_input w) = [North, South, East, West]
| otherwise = [North, South, West]
isexaminesub = case w ^? hud . hudElement . subInventory of
Just ExamineInventory{} -> True
_ -> False
selcursortype = case w ^? hud . hudElement . subInventory of
_ | ButtonRight `M.member` _mouseButtons (_input w) -> [North, South, East, West]
Just ExamineInventory{} -> [North, South, East, West]
Just CombineInventory{} -> []
_ -> [North, South, West]
secondColumnParams :: ListDisplayParams
secondColumnParams =
defaultListDisplayParams
& ldpPos . spPixelOff .~ V2 subInvX (-71)
& ldpPos . spPixelOff .~ V2 subInvX (-81)
& ldpCursorSides .~ [North, South, West]
subInvX :: Float
subInvX = 10 * fromIntegral topInvW + 50
subInvX = 10 * fromIntegral topInvW + 70
topInvW :: Int
topInvW = 15