Refactor window size, update selection cursor on new screen
This commit is contained in:
+12
-15
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user