More camera refactor
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Dodge.Render.InfoBox where
|
||||
|
||||
import Control.Lens
|
||||
import Dodge.Base
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.Render.Connectors
|
||||
@@ -10,11 +11,12 @@ import Picture
|
||||
renderInfoListAt :: Float -> Float -> Configuration -> World -> (Point2, [String]) -> Picture
|
||||
renderInfoListAt x y cfig w (p, ss) =
|
||||
renderListAt x y cfig (zip ss (repeat white))
|
||||
<> winScale cfig (color white $ lConnect (V2 (x - hw) (hh -25 - y)) (worldPosToScreen w p))
|
||||
<> winScale cfig (color white $ lConnect (V2 (x - hw) (hh -25 - y)) (worldPosToScreen cam p))
|
||||
<> listCursorNSW x y cfig 0 white 19 (length ss)
|
||||
where
|
||||
hw = halfWidth cfig
|
||||
hh = halfHeight cfig
|
||||
cam = w ^. cWorld . lWorld . camPos
|
||||
|
||||
renderInfoListsAt :: Float -> Float -> Configuration -> World -> [(Point2, [String])] -> Picture
|
||||
renderInfoListsAt x y cfig w =
|
||||
|
||||
Reference in New Issue
Block a user