Continue inventory work
This commit is contained in:
+5
-28
@@ -77,25 +77,12 @@ inventoryDisplay sss w cfig = listPicturesAtScaleOff
|
||||
cfig
|
||||
0
|
||||
pics
|
||||
<> color thecolor thecursor
|
||||
<> thecursor'
|
||||
where
|
||||
thecolor = fromMaybe white $ do
|
||||
spos <- _sssSelPos sss
|
||||
sss ^? sssSections . ix spos . ssCursor . _Just . scurColor
|
||||
thecursor = fromMaybe mempty $ do
|
||||
sectype <- you w ^? crManipulation . manObject
|
||||
let secnum = case sectype of
|
||||
InInventory SortInventory -> negate 1
|
||||
InInventory {} -> 0
|
||||
SelNothing{} -> 1
|
||||
InNearby SortNearby -> 2
|
||||
InNearby{} -> 3
|
||||
xint <- sss ^? sssSections . ix secnum . ssIndent
|
||||
spos <- _sssSelPos sss
|
||||
let y = sum . fmap (length . _ssShownItems) . fst . IM.split spos $ _sssSections sss
|
||||
yint <- sss ^? sssSections . ix spos . ssCursor . _Just . scurPos
|
||||
csize <- sss ^? sssSections . ix spos . ssCursor . _Just . scurSize
|
||||
return $ listCursorDisplayParams ldps [North,South,West] cfig (yint + y) xint white 15 csize
|
||||
thecursor' = fromMaybe mempty $ do
|
||||
i <- sss ^? sssSelPos . _Just
|
||||
j <- sss ^? sssSections . ix i . ssCursor . _Just . scurSel
|
||||
return $ selSecDrawCursor 15 [North,South,West] cfig ldps sss i j
|
||||
ldps = invDisplayParams w
|
||||
pics = foldMap _ssShownItems (_sssSections sss)
|
||||
|
||||
@@ -331,16 +318,6 @@ lnkMidPosInvSelsCol cfig w i col = winScale cfig
|
||||
hh = halfHeight cfig
|
||||
hw = halfWidth cfig
|
||||
|
||||
topCursorTypeWidth ::
|
||||
(Float -> Float -> Configuration -> Int -> Int -> Color -> Int -> Int -> Picture) ->
|
||||
Int ->
|
||||
Configuration ->
|
||||
World ->
|
||||
Int ->
|
||||
Picture
|
||||
topCursorTypeWidth ctype width cfig w i =
|
||||
ctype 0 0 cfig (fromMaybe 0 (selNumPos (InInventory (SelItem i NoInvSelAction)) w)) 0 (selNumCol i w) width (invSelSize (InInventory (SelItem i NoInvSelAction)) w)
|
||||
|
||||
determineInvSelCursorWidth :: World -> Int
|
||||
determineInvSelCursorWidth w = case _rbOptions w of
|
||||
NoRightButtonOptions -> topInvW
|
||||
|
||||
Reference in New Issue
Block a user