Refactor updates
This commit is contained in:
@@ -1,24 +1,26 @@
|
||||
module Dodge.Render.InfoBox where
|
||||
module Dodge.Render.InfoBox
|
||||
( renderInfoListAt
|
||||
, renderInfoListsAt
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import Dodge.Base
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.Data.CamPos
|
||||
import Dodge.Data.Config
|
||||
import Dodge.Render.Connectors
|
||||
import Dodge.Render.List
|
||||
import Geometry
|
||||
import Picture
|
||||
|
||||
renderInfoListAt :: Float -> Float -> Configuration -> World -> (Point2, [String]) -> Picture
|
||||
renderInfoListAt x y cfig w (p, ss) =
|
||||
renderInfoListAt :: Float -> Float -> Configuration -> CamPos -> (Point2, [String]) -> Picture
|
||||
renderInfoListAt x y cfig cam (p, ss) =
|
||||
renderListAt x y cfig (zip ss (repeat white))
|
||||
<> 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 :: Float -> Float -> Configuration -> CamPos -> [(Point2, [String])] -> Picture
|
||||
renderInfoListsAt x y cfig w =
|
||||
fst . foldr f (mempty, 0)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user