Refactor window size, update selection cursor on new screen

This commit is contained in:
2023-03-25 09:27:27 +00:00
parent 20c05be23f
commit ea0c942887
57 changed files with 346 additions and 310 deletions
+4 -4
View File
@@ -70,16 +70,16 @@ fixedSizePicClampArrow xbord ybord pic p cfig w =
, setLayer DebugLayer . color white . setDepth 20 $ arrowPic
]
where
winps = screenPolygon cfig (w ^. camPos)
bords = screenPolygonBord xbord ybord cfig (w ^. camPos)
winps = screenPolygon cfig (w ^. cwCamPos)
bords = screenPolygonBord xbord ybord cfig (w ^. cwCamPos)
borderPoint = intersectSegPolyFirst campos p bords
windowPoint = intersectSegPolyFirst campos p winps
arrowPic = case borderPoint of
Nothing -> blank
Just bp -> thickLine 5 [bp, fromMaybe p windowPoint]
(V2 x y) = fromMaybe p borderPoint
campos = w ^. camPos . camCenter
theScale = 1 / (w ^. camPos . camZoom)
campos = w ^. cwCamPos . camCenter
theScale = 1 / (w ^. cwCamPos . camZoom)
--absClamp ::
-- -- | clamping value, assumed positive