Separate selection list items from display parameters
This commit is contained in:
@@ -16,8 +16,8 @@ import Picture
|
||||
|
||||
drawMenuScreen :: Configuration -> ScreenLayer -> Picture
|
||||
drawMenuScreen cfig screen = case screen of
|
||||
OptionScreen{_scTitle = titf, _scSelectionList = selpos} ->
|
||||
drawOptions cfig titf selpos "Use keys to navigate the menu"
|
||||
OptionScreen{_scTitle = titf, _scSelectionList = selpos, _scListDisplayParams = ldps} ->
|
||||
drawOptions ldps cfig titf selpos "Use keys to navigate the menu"
|
||||
-- (WaitScreen sf _) -> drawOptions w (sf w) [] 0 ""
|
||||
(InputScreen inputstr help) -> drawInputMenu cfig ('>' : T.unpack inputstr) help
|
||||
-- (DisplayScreen sd) -> sd w
|
||||
@@ -77,6 +77,7 @@ drawInputMenu cfig title footer =
|
||||
]
|
||||
|
||||
drawOptions ::
|
||||
ListDisplayParams ->
|
||||
Configuration ->
|
||||
-- | Title
|
||||
String ->
|
||||
@@ -85,12 +86,12 @@ drawOptions ::
|
||||
-- | Help Text
|
||||
String ->
|
||||
Picture
|
||||
drawOptions cfig title sl footer =
|
||||
drawOptions ldps cfig title sl footer =
|
||||
pictures
|
||||
[ darkenBackground cfig
|
||||
, drawTitle cfig title
|
||||
, drawFooterText cfig red footer
|
||||
, drawSelectionList cfig sl
|
||||
, drawSelectionList ldps cfig sl
|
||||
]
|
||||
|
||||
darkenBackground :: Configuration -> Picture
|
||||
|
||||
Reference in New Issue
Block a user