Cleanup
This commit is contained in:
@@ -1,22 +1,42 @@
|
||||
module Dodge.Render.InfoBox
|
||||
( renderInfoListAt
|
||||
, renderInfoListsAt
|
||||
) where
|
||||
module Dodge.Render.InfoBox (
|
||||
renderInfoListAt,
|
||||
renderInfoListsAt,
|
||||
) where
|
||||
|
||||
import Dodge.Data.CardinalPoint -- this should be imported implicitly
|
||||
-- this should be imported implicitly
|
||||
import Dodge.Base
|
||||
import Dodge.Data.Camera
|
||||
import Dodge.Data.CardinalPoint
|
||||
import Dodge.Data.Config
|
||||
import Dodge.Data.SelectionList
|
||||
import Dodge.Render.Connectors
|
||||
import Dodge.Render.List
|
||||
import Geometry
|
||||
import Picture
|
||||
|
||||
renderInfoListAt :: Float -> Float -> Configuration -> Camera -> (Point2, [String]) -> Picture
|
||||
renderInfoListAt ::
|
||||
Float ->
|
||||
Float ->
|
||||
Configuration ->
|
||||
Camera ->
|
||||
(Point2, [String]) ->
|
||||
Picture
|
||||
renderInfoListAt x y cfig cam (p, ss) =
|
||||
toTopLeft cfig (renderListAt x y (zip ss (repeat white)))
|
||||
<> color white (lConnect (V2 (x - hw) (hh -25 - y)) (worldPosToScreen cam p))
|
||||
<> toTopLeft cfig (translate x (-y) $ listCursorChooseBorderScale 0 1 [North,South] 0 0 white 19 (length ss))
|
||||
<> toTopLeft
|
||||
cfig
|
||||
( translate x (- y) $
|
||||
listCursorChooseBorderScale
|
||||
0
|
||||
1
|
||||
(BoundaryCursor [North, South])
|
||||
0
|
||||
0
|
||||
white
|
||||
19
|
||||
(length ss)
|
||||
)
|
||||
where
|
||||
hw = halfWidth cfig
|
||||
hh = halfHeight cfig
|
||||
|
||||
Reference in New Issue
Block a user