--{-# LANGUAGE TupleSections #-}
module Dodge.Render.Picture
    ( fixedCoordPictures
    ) where
import Dodge.Data
--import Dodge.Base.Window
import Dodge.Base.WinScale
import Dodge.Render.HUD
import Dodge.Render.MenuScreen
import Geometry
import Picture

fixedCoordPictures :: Universe -> Picture
fixedCoordPictures u = case _menuLayers u of 
    [] -> pictures
        [ hudDrawings cfig w
        , customMouseCursor cfig w
        ]
    (lay:_) -> setDepth (-1) . winScale cfig $ menuScreen u lay
  where 
    w = _uvWorld u
    cfig = _config u

customMouseCursor :: Configuration -> World -> Picture
customMouseCursor cfig w = winScale cfig
    . uncurryV translate (_mousePos w)
    . color white
    $ pictures [ line [V2 (-5) 0,V2 5 0] , line [V2 0 (-5),V2 0 5] ]
