This commit is contained in:
2024-10-31 09:55:57 +00:00
parent a2dd10323c
commit de12f0ef34
4 changed files with 1 additions and 19 deletions
+1 -5
View File
@@ -1,5 +1 @@
/home/justin/Haskell/loop/src/Dodge/DisplayInventory.hs:214:5-9: warning: [-Wunused-local-binds]
Defined but not used: scurs
|
214 | scurs = do
| ^^^^^
All good (594 modules, at 09:55:51)
-1
View File
@@ -34,7 +34,6 @@ data SectionCursor = SectionCursor
data SelectionSection a = SelectionSection
{ _ssItems :: IntMap (SelectionItem a)
-- , _ssCursor :: Maybe SectionCursor
, _ssMinSize :: Int
, _ssOffset :: Int
, _ssShownItems :: [Picture]
-1
View File
@@ -187,7 +187,6 @@ defaultSS :: SelectionSection a
defaultSS =
SelectionSection
{ _ssItems = mempty
-- , _ssCursor = Nothing
, _ssMinSize = 10
, _ssOffset = 0
, _ssShownItems = []
-12
View File
@@ -206,18 +206,10 @@ updateSection ::
updateSection sis mcsel availablelines ss =
ss
& ssItems .~ sis
-- & ssCursor .~ scurs
& ssOffset .~ offset
& ssShownItems .~ shownitems
where
oldoffset = ss ^. ssOffset
scurs = do
csel <- mcsel
(_, si) <- IM.lookupGE csel sis -- this is not right?
let cpos = sum (fmap _siHeight . fst . IM.split csel $ sis)
csize = length $ _siPictures si
ccolor = _siColor si
return $ SectionCursor (cpos - offset) csize ccolor
nocursoroffset =
if length allstrings - oldoffset <= availablelines
then max 0 (length allstrings - availablelines)
@@ -290,7 +282,6 @@ enterCombineInv cfig w =
filtsection =
SelectionSection
{ _ssItems = mempty
-- , _ssCursor = Nothing
, _ssMinSize = 0
, _ssOffset = 0
, _ssShownItems = mempty
@@ -304,9 +295,6 @@ enterCombineInv cfig w =
availablelines
SelectionSection
{ _ssItems = cm
-- , _ssCursor = do
-- (_, si) <- IM.lookupMin cm
-- return $ SectionCursor 0 (_siHeight si) (_siColor si)
, _ssMinSize = 5
, _ssOffset = 0
, _ssShownItems = mempty