Cleanup
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
+1
-1
@@ -1 +1 @@
|
|||||||
All good (594 modules, at 10:28:16)
|
All good (594 modules, at 19:29:05)
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ updateSection sis mcsel availablelines ss =
|
|||||||
ss
|
ss
|
||||||
& ssItems .~ sis
|
& ssItems .~ sis
|
||||||
& ssOffset .~ offset
|
& ssOffset .~ offset
|
||||||
& ssShownItems .~ shownitems
|
& ssShownItems .~ tweakfirst shownitems
|
||||||
where
|
where
|
||||||
oldoffset = ss ^. ssOffset
|
oldoffset = ss ^. ssOffset
|
||||||
nocursoroffset =
|
nocursoroffset =
|
||||||
@@ -261,16 +261,16 @@ updateSection sis mcsel availablelines ss =
|
|||||||
_ -> oldoffset
|
_ -> oldoffset
|
||||||
tweakfirst (x : xs)
|
tweakfirst (x : xs)
|
||||||
| offset > 0 =
|
| offset > 0 =
|
||||||
translate 0 (-100) (color moreupcolor $ text (theindent ++ replicate 15 '^')) :
|
(color moreupcolor $ text (theindent ++ replicate 15 (toEnum 30))) :
|
||||||
map h xs
|
xs
|
||||||
| otherwise = map h (x : xs)
|
| otherwise = (x : xs)
|
||||||
tweakfirst [] = []
|
tweakfirst [] = []
|
||||||
moreupcolor = fromMaybe white $ allstrings ^? ix offset . _1
|
moreupcolor = fromMaybe white $ allstrings ^? ix offset . _1
|
||||||
shownitems
|
shownitems
|
||||||
| length shownstrings > availablelines =
|
| length shownstrings > availablelines =
|
||||||
tweakfirst (take (availablelines - 1) shownstrings)
|
(map h $ take (availablelines - 1) shownstrings)
|
||||||
++ [translate 0 100 . color moredowncolor . textVMirror $ theindent ++ replicate 15 '^']
|
++ [color moredowncolor . text $ theindent ++ replicate 15 (toEnum 31)]
|
||||||
| otherwise = tweakfirst shownstrings
|
| otherwise = map h shownstrings
|
||||||
moredowncolor = fromMaybe white $ allstrings ^? ix (offset + availablelines - 1) . _1
|
moredowncolor = fromMaybe white $ allstrings ^? ix (offset + availablelines - 1) . _1
|
||||||
allstrings = listSelectionColorPicture sis
|
allstrings = listSelectionColorPicture sis
|
||||||
shownstrings = drop offset allstrings
|
shownstrings = drop offset allstrings
|
||||||
|
|||||||
@@ -131,10 +131,11 @@ getMouseInvSel w = case w ^? hud . hudElement . subInventory . nsSelected of
|
|||||||
|
|
||||||
drawDISelections :: World -> Picture
|
drawDISelections :: World -> Picture
|
||||||
drawDISelections w = fromMaybe mempty $ do
|
drawDISelections w = fromMaybe mempty $ do
|
||||||
((_, j), (_, b)) <- getMouseInvSel w
|
((i, j), (a, b)) <- getMouseInvSel w
|
||||||
|
guard $ i == a
|
||||||
sss <- w ^? hud . hudElement . diSections
|
sss <- w ^? hud . hudElement . diSections
|
||||||
let idp = invDisplayParams w
|
let idp = invDisplayParams w
|
||||||
let f x = selSecDrawCursorAt 15 idp BackdropCursor sss (0,x)
|
let f x = selSecDrawCursorAt 15 idp BackdropCursor sss (i,x)
|
||||||
return . color (withAlpha 0.2 white) . foldMap f $ [min j b..max j b]
|
return . color (withAlpha 0.2 white) . foldMap f $ [min j b..max j b]
|
||||||
|
|
||||||
drawSubInventory :: SubInventory -> Configuration -> World -> Picture
|
drawSubInventory :: SubInventory -> Configuration -> World -> Picture
|
||||||
|
|||||||
Reference in New Issue
Block a user