Allow for events to do io
This commit is contained in:
@@ -3,7 +3,7 @@ module Dodge.Render.Picture
|
||||
( fixedCoordPictures
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.Base.Window
|
||||
--import Dodge.Base.Window
|
||||
import Dodge.WinScale
|
||||
import Dodge.Picture.Layer
|
||||
import Dodge.Render.HUD
|
||||
@@ -12,20 +12,18 @@ import Geometry
|
||||
import Picture
|
||||
|
||||
fixedCoordPictures :: Universe -> Picture
|
||||
fixedCoordPictures w = case _menuLayers w of
|
||||
fixedCoordPictures u = case _menuLayers u of
|
||||
[] -> pictures
|
||||
[ hudDrawings (_config w) (_uvWorld w)
|
||||
, customMouseCursor (_config w) (_uvWorld w)
|
||||
[ hudDrawings cfig w
|
||||
, customMouseCursor cfig w
|
||||
]
|
||||
(lay:_) -> scaler . onLayer MenuDepth $ menuScreen w lay
|
||||
(lay:_) -> setDepth (-1) . winScale cfig . onLayer MenuDepth $ menuScreen u lay
|
||||
where
|
||||
scaler = setDepth (-1) . winScale cfig
|
||||
cfig = _config w
|
||||
w = _uvWorld u
|
||||
cfig = _config u
|
||||
|
||||
customMouseCursor :: Configuration -> World -> Picture
|
||||
customMouseCursor cfig w =
|
||||
winScale cfig
|
||||
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] ]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user