Work on mouse selection in options menu

This commit is contained in:
2023-05-10 10:02:37 +01:00
parent ab714d63db
commit cc42a5e124
10 changed files with 130 additions and 88 deletions
+4 -1
View File
@@ -1,11 +1,11 @@
module Dodge.ScreenPos where
import Control.Lens
import Dodge.Base.Window
import Dodge.Data.Config
import Dodge.Data.ScreenPos
import Geometry.Data
import Picture.Base
import Control.Lens
fromTopLeft :: Point2 -> ScreenPos
fromTopLeft (V2 x y) = ScreenPos (V2 (-0.5) 0.5) (V2 x (- y))
@@ -16,3 +16,6 @@ translateScreenPos cfig sp = translate x y
V2 x y = sp ^. spScreenOff * V2 hw hh + sp ^. spPixelOff
hw = halfWidth cfig
hh = halfHeight cfig
screenPosAbs :: Configuration -> ScreenPos -> Point2
screenPosAbs = undefined