Mapper, ARHUD, radar sweeps update. Add dropper items
This commit is contained in:
@@ -1,15 +1,26 @@
|
||||
module Dodge.RadarSweep.Draw where
|
||||
module Dodge.RadarSweep.Draw (
|
||||
drawRadarSweep,
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Data.RadarSweep
|
||||
import Geometry
|
||||
import Picture
|
||||
|
||||
-- I have taken shortcuts in determining whether this is drawn or not wrt to the
|
||||
-- linked ARHUD: it needs to have existed at the sweeps original creation, then
|
||||
-- the sweep is drawn
|
||||
drawRadarSweep :: RadarSweep -> Picture
|
||||
drawRadarSweep pt = setLayer DebugLayer $ fold
|
||||
[ colHelper 0.1 $ uncurryV translate p $ thickCircle r 15
|
||||
, colHelper 0.06 $ uncurryV translate p $ thickCircle (r -5) 5
|
||||
, colHelper 0.03 $ uncurryV translate p $ thickCircle (r -10) 5
|
||||
]
|
||||
drawRadarSweep pt
|
||||
| isJust (pt ^. rsAR) =
|
||||
setLayer DebugLayer $
|
||||
fold
|
||||
[ colHelper 0.1 $ uncurryV translate p $ thickCircle r 15
|
||||
, colHelper 0.06 $ uncurryV translate p $ thickCircle (r -5) 5
|
||||
, colHelper 0.03 $ uncurryV translate p $ thickCircle (r -10) 5
|
||||
]
|
||||
| otherwise = mempty
|
||||
where
|
||||
col = rsObjectColor $ _rsObject pt
|
||||
p = _rsPos pt
|
||||
|
||||
Reference in New Issue
Block a user