Fix equipping bug, select sensible equipment position

This commit is contained in:
2022-05-24 16:12:48 +01:00
parent 7c472c4ca4
commit 0349443853
2 changed files with 23 additions and 8 deletions
+7 -3
View File
@@ -136,7 +136,9 @@ subInventoryDisplay subinv cfig w = case subinv of
-- = listTextPictureAt 144 0 cfig (selNumPos invid w) . color col $ text $ eqPosText epos
-- | otherwise = mempty
--rboptions = listTextPicturesAtOffset 200 0 cfig (selNumPos invid w) ["TEST","ME"]
rboptions = drawRBOptions cfig w (_rbOptions w)
rboptions = if ButtonRight `S.member` _mouseButtons w
then drawRBOptions cfig w (_rbOptions w)
else mempty
drawRBOptions :: Configuration -> World -> RightButtonOptions -> Picture
drawRBOptions cfig w EquipOptions{_opEquip = es,_opSel=i, _opAllocateEquipment=ae} =
@@ -225,8 +227,10 @@ topCursorTypeWidth ctype width cfig w i
determineInvSelCursorWidth :: World -> Int
determineInvSelCursorWidth w = case _rbOptions w of
NoRightButtonOptions -> topInvW
EquipOptions {} -> 47
NoRightButtonOptions -> topInvW
EquipOptions {} -> if ButtonRight `S.member` _mouseButtons w
then 47
else topInvW
--listSelHeight :: Configuration -> World -> Int -> Float
--listSelHeight