Separate out input datatype

This commit is contained in:
2022-10-29 11:36:57 +01:00
parent 82e2a5a234
commit af6cdff063
19 changed files with 160 additions and 112 deletions
+3 -3
View File
@@ -141,7 +141,7 @@ subInventoryDisplay subinv cfig w = case subinv of
selcursor' ct = fromMaybe mempty $ ct 0 0 cfig curpos itcol (determineInvSelCursorWidth w) cury <$ it
selcursor = selcursor' selcursortype
selcursortype
| ButtonRight `M.member` _mouseButtons w = listCursorNESW
| ButtonRight `M.member` _mouseButtons (_input w) = listCursorNESW
| otherwise = listCursorNSW
curpos = invSelPos w
cury = fromMaybe 1 $ augmentedInvSizes w IM.!? crSel (you w)
@@ -151,7 +151,7 @@ subInventoryDisplay subinv cfig w = case subinv of
equipcursors = IM.foldMapWithKey (f yellow) (_crInvEquipped cr)
f col invid epos = listTextPictureAt 144 0 cfig (selNumPos invid w) . color col $ text $ eqPosText epos
rboptions =
if ButtonRight `M.member` _mouseButtons w
if ButtonRight `M.member` _mouseButtons (_input w)
then drawRBOptions cfig w (_rbOptions w)
else mempty
@@ -277,7 +277,7 @@ determineInvSelCursorWidth :: World -> Int
determineInvSelCursorWidth w = case _rbOptions w of
NoRightButtonOptions -> topInvW
EquipOptions{} ->
if ButtonRight `M.member` _mouseButtons w
if ButtonRight `M.member` _mouseButtons (_input w)
then 47
else topInvW