This commit is contained in:
2024-11-26 22:55:55 +00:00
parent 2b969f6530
commit f64dc86a30
5 changed files with 29 additions and 52 deletions
+5 -18
View File
@@ -1,5 +1,5 @@
module Dodge.ListDisplayParams (
invDisplayParams,
invDP,
invCursorParams,
secondColumnParams,
subInvX,
@@ -29,11 +29,11 @@ defaultListDisplayParams =
, _ldpWidth = UseItemWidth
}
invDisplayParams :: World -> ListDisplayParams
invDisplayParams w =
invDP :: ListDisplayParams
invDP =
defaultListDisplayParams
-- & ldpWidth .~ FixedSelectionWidth (determineInvSelCursorWidth w)
& ldpPos . spPixelOff .~ V2 6 (-1)
-- & ldpPos . spPixelOff .~ V2 6 (-1)
& ldpPos . spPixelOff .~ V2 6 0
invCursorParams :: World -> CursorDisplay
invCursorParams w = BoundaryCursor $ case w ^? hud . hudElement . subInventory of
@@ -53,19 +53,6 @@ subInvX = 10 * fromIntegral topInvW + 70
topInvW :: Int
topInvW = 15
determineInvSelCursorWidth :: World -> Int
determineInvSelCursorWidth w = case _rbOptions w of
NoRightButtonOptions -> topInvW
EquipOptions{}
| ButtonRight `M.member` _mouseButtons (_input w)
&& hasnosubinv ->
47
| otherwise -> topInvW
where
hasnosubinv = case w ^? hud . hudElement . subInventory of
Just NoSubInventory{} -> True
_ -> False
optionListDisplayParams :: ListDisplayParams
optionListDisplayParams =
defaultListDisplayParams