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
+12 -15
View File
@@ -1,25 +1,22 @@
module Dodge.Render.Label
where
import Dodge.Base.Coordinate
import Dodge.ShortShow
import Dodge.Base.WinScale
import Picture
module Dodge.Render.Label where
import Dodge.Data.Universe
import Dodge.ShortShow
import Geometry
import Picture
drawLabCrossCol :: Configuration -> CamPos -> Color -> Point2 -> Picture
drawLabCrossCol cfig w col p = drawCrossCol col p
<> drawPointLabel cfig w p
drawLabCrossCol :: Color -> Point2 -> Picture
drawLabCrossCol col p =
drawCrossCol col p
<> drawPointLabel p
drawPointLabel :: Configuration -> CamPos -> Point2 -> Picture
drawPointLabel cfig w p =
setLayer FixedCoordLayer . winScale cfig
. uncurryV translate p'
drawPointLabel :: Point2 -> Picture
drawPointLabel p =
setLayer DebugLayer
. uncurryV translate p
. scale 0.1 0.1
. text
$ shortPoint2 p
where
p' = worldPosToScreen w p
drawCrossCol :: Color -> Point2 -> Picture
drawCrossCol col p = setLayer DebugLayer . color col . uncurryV translate p $ crossPic 5