Render controls using options menu
This commit is contained in:
@@ -11,7 +11,6 @@ import Dodge.Render.List
|
||||
import qualified Data.Text as T
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Data.Universe
|
||||
import Padding
|
||||
import Picture
|
||||
|
||||
drawMenuScreen :: Configuration -> ScreenLayer -> Picture
|
||||
@@ -21,7 +20,6 @@ drawMenuScreen cfig screen = case screen of
|
||||
-- (WaitScreen sf _) -> drawOptions w (sf w) [] 0 ""
|
||||
(InputScreen inputstr help) -> drawInputMenu cfig ('>' : T.unpack inputstr) help
|
||||
-- (DisplayScreen sd) -> sd w
|
||||
(ColumnsScreen titf pairs) -> drawTwoColumnsScreen cfig titf pairs
|
||||
|
||||
--menuScreen :: Configuration -> ScreenLayer -> Picture
|
||||
--menuScreen cfig screen = case screen of
|
||||
@@ -40,28 +38,6 @@ drawMenuScreen cfig screen = case screen of
|
||||
-- ys = [0,22..]
|
||||
-- f y s = translate (10-hw) y . scale 0.15 0.15 $ text s
|
||||
|
||||
drawTwoColumnsScreen :: Configuration -> String -> [(String, String)] -> Picture
|
||||
drawTwoColumnsScreen cfig title lps =
|
||||
pictures
|
||||
[ darkenBackground cfig
|
||||
, drawTitle cfig title
|
||||
, drawTwoColumns cfig lps
|
||||
]
|
||||
|
||||
drawTwoColumns :: Configuration -> [(String, String)] -> Picture
|
||||
drawTwoColumns cfig lps = listPicturesAtScaleOff 30 2 50 50 cfig 0 $ map f lps
|
||||
where
|
||||
f (s1, s2) = color white $ text $ rightPad ln '.' s1 ++ s2
|
||||
ln = maximum (map (length . fst) lps) + 3
|
||||
|
||||
--drawTwoColumns' :: Configuration -> [(String, String)] -> Picture
|
||||
--drawTwoColumns' cfig lps = pictures $ zipWith f [hh -100, hh -130 ..] lps
|
||||
-- where
|
||||
-- f y (s1, s2) = placeString (50 - hw) y 0.15 $ rightPad ln '.' s1 ++ s2
|
||||
-- hh = halfHeight cfig
|
||||
-- hw = halfWidth cfig
|
||||
-- ln = maximum (map (length . fst) lps) + 3
|
||||
|
||||
drawInputMenu ::
|
||||
Configuration ->
|
||||
-- | Title
|
||||
|
||||
Reference in New Issue
Block a user