Refactor window size, update selection cursor on new screen
This commit is contained in:
@@ -5,9 +5,7 @@ module Dodge.Base.Coordinate (
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import Dodge.Base.WinScale
|
||||
import Dodge.Data.CamPos
|
||||
import Dodge.Data.Config
|
||||
import Dodge.Data.HUD
|
||||
import Dodge.Data.Input
|
||||
import Geometry
|
||||
@@ -33,8 +31,8 @@ worldPosToScreen cam =
|
||||
{- | Transform coordinates from the map position to screen
|
||||
coordinates.
|
||||
-}
|
||||
cartePosToScreen :: Configuration -> HUD -> Point2 -> Point2
|
||||
cartePosToScreen cfig thehud = doWindowScale cfig . doRotate . doZoom . doTranslate
|
||||
cartePosToScreen :: HUD -> Point2 -> Point2
|
||||
cartePosToScreen thehud = doRotate . doZoom . doTranslate
|
||||
where
|
||||
doTranslate p = p -.- (thehud ^. carteCenter) -- _carteCenter (_hud (_cWorld w))
|
||||
doZoom p = (thehud ^. carteZoom) *.* p
|
||||
|
||||
Reference in New Issue
Block a user