This commit is contained in:
2024-11-20 17:24:05 +00:00
parent a05511f6d8
commit b750fe4186
6 changed files with 200 additions and 229 deletions
+9 -22
View File
@@ -86,8 +86,6 @@ mouseCursorType u = case u ^. uvWorld . input . mouseContext of
MouseInGame -> drawPlus 5
OverInvDrag (Just _) -> drawDrag 5
OverInvDrag Nothing -> drawDragDrop 5
OverInvFiltDrag -> drawFiltDrag 5
OverInvFiltDragDrop -> drawFiltDragDrop 5
OverInvDragSelect {} -> drawDragSelect 5
OverInvSelect {} -> drawSelect 5
OverInvFilt {} -> drawCombFilter 5
@@ -177,26 +175,15 @@ drawDragDrop x =
z = 1.5 * x
y = 0.7 * x
drawFiltDrag :: Float -> Picture
drawFiltDrag x = polygonWire
[ V2 0 y
, V2 x y
, V2 0 (-y)
, V2 (-x) (-y)
]
where
y = 0.5 * x
drawFiltDragDrop :: Float -> Picture
drawFiltDragDrop x = polygonWire
[ V2 0 y
, V2 x y
, V2 0 (-y)
, V2 (-x) (-y)
] <> line [V2 (-x) x,V2 0 x,V2 0 (-x)]
<> line [V2 (-y) (y-x), V2 0 (-x), V2 y (y-x)]
where
y = 0.5 * x
--drawFiltDrag :: Float -> Picture
--drawFiltDrag x = polygonWire
-- [ V2 0 y
-- , V2 x y
-- , V2 0 (-y)
-- , V2 (-x) (-y)
-- ]
-- where
-- y = 0.5 * x
drawSelect :: Float -> Picture
drawSelect x = polygonWire $ rectWH (0.5 * x) (0.5 * x)