Fix equipping bug, select sensible equipment position
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user