Fix mouse selection in menus
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
module Dodge.ScreenPos where
|
||||
|
||||
import Control.Lens
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Data.Config
|
||||
import Dodge.Data.ScreenPos
|
||||
import Geometry.Data
|
||||
@@ -13,9 +12,9 @@ fromTopLeft (V2 x y) = ScreenPos (V2 (-0.5) 0.5) (V2 x (- y))
|
||||
translateScreenPos :: Configuration -> ScreenPos -> Picture -> Picture
|
||||
translateScreenPos cfig sp = translate x y
|
||||
where
|
||||
V2 x y = sp ^. spScreenOff * V2 hw hh + sp ^. spPixelOff
|
||||
hw = halfWidth cfig
|
||||
hh = halfHeight cfig
|
||||
V2 x y = sp ^. spScreenOff * V2 w h + sp ^. spPixelOff
|
||||
w = fromIntegral $ cfig ^. windowX
|
||||
h = fromIntegral $ cfig ^. windowY
|
||||
|
||||
screenPosAbs :: Configuration -> ScreenPos -> Point2
|
||||
screenPosAbs = undefined
|
||||
|
||||
Reference in New Issue
Block a user