Change behaviour when clicking on filter

This commit is contained in:
2024-11-26 11:59:26 +00:00
parent 145ab77859
commit a4d95c5bd5
6 changed files with 35 additions and 11 deletions
+2 -1
View File
@@ -362,7 +362,8 @@ drawTerminalDisplay tid cfig w = fromMaybe mempty $ do
return $
invHead cfig (_tmTitle tm ++ ":T" ++ show tid)
<> drawSelectionList secondColumnParams cfig (thesellist tm)
<> color (withAlpha 0.5 green) (drawSelectionListBackground secondColumnParams cfig tsize)
<> color (withAlpha 0.5 green) -- consider integrating termScreenColor somehow
(drawSelectionListBackground secondColumnParams cfig tsize)
<> color (dark $ _tmExternalColor tm) (drawTitleBackground cfig)
where
toselitm (str, col) = SelectionItem [str] 1 True col 0 ()
+8 -4
View File
@@ -95,16 +95,19 @@ mouseCursorType u = case u ^. uvWorld . input . mouseContext of
OverInvDrag 3 _ _ _ -> drawEmptySet 5
OverInvDrag {} -> drawEmptySet 5
OverInvDragSelect {} -> drawDragSelect 5
OverInvSelect (-1,_) | selsec == Just (-1) -> drawJumpDown 5
OverInvSelect (2,_) | selsec == Just 2-> drawJumpDown 5
OverInvSelect {} -> drawSelect 5
OverInvFilt {} -> drawCombFilter 5
OverCombFiltInv {} -> drawCombFilter 5
OverCombSelect {} -> drawSelect 5
OverCombFilter {} -> drawCombFilterJump 5
OverCombFilter {} -> drawJumpDown 5
OverCombCombine {} -> drawGapPlus 5
OverCombEscape -> rotate (pi/4) $ drawPlus 5
OverTerminalReturn {} -> drawReturn 5
OverTerminalEscape -> rotate (pi/4) $ drawPlus 5
where
w = u ^. uvWorld
selsec = u ^? uvWorld . hud . hudElement . diSelection . _Just . _1
a = fromMaybe 0 $ do
cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos
return . toClosestMultiple (pi / 32) $
@@ -156,8 +159,9 @@ drawMenuCursor z = fold
y = x + z
ny = - y
nx = - x
drawCombFilterJump :: Float -> Picture
drawCombFilterJump x = rotate (0.25*pi)
drawJumpDown :: Float -> Picture
drawJumpDown x = rotate (0.25*pi)
$ fold [line [V2 0 0, V2 x 0], line [V2 0 0, V2 0 x]]
drawDragSelect :: Float -> Picture