Cleanup
This commit is contained in:
+1
-5
@@ -1,5 +1 @@
|
|||||||
/home/justin/Haskell/loop/src/Dodge/DisplayInventory.hs:214:5-9: warning: [-Wunused-local-binds]
|
All good (594 modules, at 09:55:51)
|
||||||
Defined but not used: ‘scurs’
|
|
||||||
|
|
|
||||||
214 | scurs = do
|
|
||||||
| ^^^^^
|
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ data SectionCursor = SectionCursor
|
|||||||
|
|
||||||
data SelectionSection a = SelectionSection
|
data SelectionSection a = SelectionSection
|
||||||
{ _ssItems :: IntMap (SelectionItem a)
|
{ _ssItems :: IntMap (SelectionItem a)
|
||||||
-- , _ssCursor :: Maybe SectionCursor
|
|
||||||
, _ssMinSize :: Int
|
, _ssMinSize :: Int
|
||||||
, _ssOffset :: Int
|
, _ssOffset :: Int
|
||||||
, _ssShownItems :: [Picture]
|
, _ssShownItems :: [Picture]
|
||||||
|
|||||||
@@ -187,7 +187,6 @@ defaultSS :: SelectionSection a
|
|||||||
defaultSS =
|
defaultSS =
|
||||||
SelectionSection
|
SelectionSection
|
||||||
{ _ssItems = mempty
|
{ _ssItems = mempty
|
||||||
-- , _ssCursor = Nothing
|
|
||||||
, _ssMinSize = 10
|
, _ssMinSize = 10
|
||||||
, _ssOffset = 0
|
, _ssOffset = 0
|
||||||
, _ssShownItems = []
|
, _ssShownItems = []
|
||||||
|
|||||||
@@ -206,18 +206,10 @@ updateSection ::
|
|||||||
updateSection sis mcsel availablelines ss =
|
updateSection sis mcsel availablelines ss =
|
||||||
ss
|
ss
|
||||||
& ssItems .~ sis
|
& ssItems .~ sis
|
||||||
-- & ssCursor .~ scurs
|
|
||||||
& ssOffset .~ offset
|
& ssOffset .~ offset
|
||||||
& ssShownItems .~ shownitems
|
& ssShownItems .~ shownitems
|
||||||
where
|
where
|
||||||
oldoffset = ss ^. ssOffset
|
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 =
|
nocursoroffset =
|
||||||
if length allstrings - oldoffset <= availablelines
|
if length allstrings - oldoffset <= availablelines
|
||||||
then max 0 (length allstrings - availablelines)
|
then max 0 (length allstrings - availablelines)
|
||||||
@@ -290,7 +282,6 @@ enterCombineInv cfig w =
|
|||||||
filtsection =
|
filtsection =
|
||||||
SelectionSection
|
SelectionSection
|
||||||
{ _ssItems = mempty
|
{ _ssItems = mempty
|
||||||
-- , _ssCursor = Nothing
|
|
||||||
, _ssMinSize = 0
|
, _ssMinSize = 0
|
||||||
, _ssOffset = 0
|
, _ssOffset = 0
|
||||||
, _ssShownItems = mempty
|
, _ssShownItems = mempty
|
||||||
@@ -304,9 +295,6 @@ enterCombineInv cfig w =
|
|||||||
availablelines
|
availablelines
|
||||||
SelectionSection
|
SelectionSection
|
||||||
{ _ssItems = cm
|
{ _ssItems = cm
|
||||||
-- , _ssCursor = do
|
|
||||||
-- (_, si) <- IM.lookupMin cm
|
|
||||||
-- return $ SectionCursor 0 (_siHeight si) (_siColor si)
|
|
||||||
, _ssMinSize = 5
|
, _ssMinSize = 5
|
||||||
, _ssOffset = 0
|
, _ssOffset = 0
|
||||||
, _ssShownItems = mempty
|
, _ssShownItems = mempty
|
||||||
|
|||||||
Reference in New Issue
Block a user