Rename help text-> footer text, rename tractor param
This commit is contained in:
@@ -13,7 +13,7 @@ menuScreen w screen = case screen of
|
||||
OptionScreen {_scTitle = titf, _scOptions = mos}
|
||||
-> drawOptions w (titf w) mos "Use keys to navigate the menu"
|
||||
(WaitScreen sf _) -> drawOptions w (sf w) [] ""
|
||||
(InputScreen s help) -> drawOptions w (s) [] help
|
||||
(InputScreen inputstr help) -> drawOptions w inputstr [] help
|
||||
(DisplayScreen sd ) -> sd w
|
||||
(ColumnsScreen title pairs) -> drawTwoColumnsScreen (_config w) title pairs
|
||||
|
||||
@@ -49,9 +49,11 @@ drawOptions
|
||||
-> [MenuOption] -- ^ Options
|
||||
-> String -- ^ Help Text
|
||||
-> Picture
|
||||
drawOptions u title ops help = pictures $
|
||||
[darkenBackground cfig
|
||||
, drawTitle cfig title, drawHelpText cfig help red] ++
|
||||
drawOptions u title ops footer = pictures $
|
||||
[ darkenBackground cfig
|
||||
, drawTitle cfig title
|
||||
, drawFooterText cfig red footer
|
||||
] ++
|
||||
zipWith (\s vpos -> placeString (-hw + 50) vpos 0.2 s)
|
||||
(map (menuOptionToString u) ops')
|
||||
[hh-100,hh-150 ..]
|
||||
@@ -74,10 +76,9 @@ drawTitle cfig = placeString (-hw + 30) (hh - 50) 0.4
|
||||
hh = halfHeight cfig
|
||||
hw = halfWidth cfig
|
||||
|
||||
drawHelpText :: Configuration -> String -> Color -> Picture
|
||||
drawHelpText cfig col = placeString (-hw + 30) (-hh+10) 0.1 col
|
||||
drawFooterText :: Configuration -> Color -> String -> Picture
|
||||
drawFooterText cfig col = translate (-hw + 30) (-hh+10) . scale 0.1 0.1 . color col . text
|
||||
where
|
||||
placeString x y sc t col = translate x y $ scale sc sc $ color col $ text t
|
||||
hh = halfHeight cfig
|
||||
hw = halfWidth cfig
|
||||
|
||||
|
||||
Reference in New Issue
Block a user