Rethink unselectable items in lists
This commit is contained in:
@@ -16,27 +16,8 @@ import Picture
|
||||
drawMenuScreen :: Configuration -> ScreenLayer -> Picture
|
||||
drawMenuScreen cfig screen = case screen of
|
||||
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 ""
|
||||
drawOptions ldps cfig titf selpos
|
||||
(InputScreen inputstr help) -> drawInputMenu cfig ('>' : T.unpack inputstr) help
|
||||
-- (DisplayScreen sd) -> sd w
|
||||
|
||||
--menuScreen :: Configuration -> ScreenLayer -> Picture
|
||||
--menuScreen cfig screen = case screen of
|
||||
-- OptionScreen{_scTitle = titf, _scSelectionList = selpos} ->
|
||||
-- drawOptions cfig titf selpos "Use keys to navigate the menu"
|
||||
-- (InputScreen inputstr help) -> drawInputMenu cfig ('>' : T.unpack inputstr) help
|
||||
-- (ColumnsScreen titf pairs) -> drawTwoColumnsScreen cfig titf pairs
|
||||
|
||||
--displayStringList :: World -> [String] -> Picture
|
||||
--displayStringList w ss = pictures
|
||||
-- ( polygon (screenBox w)
|
||||
-- : zipWith f ys ss
|
||||
-- )
|
||||
-- where
|
||||
-- hw = halfWidth w
|
||||
-- ys = [0,22..]
|
||||
-- f y s = translate (10-hw) y . scale 0.15 0.15 $ text s
|
||||
|
||||
drawInputMenu ::
|
||||
Configuration ->
|
||||
@@ -59,14 +40,11 @@ drawOptions ::
|
||||
String ->
|
||||
-- | Select position
|
||||
SelectionList a ->
|
||||
-- | Help Text
|
||||
String ->
|
||||
Picture
|
||||
drawOptions ldps cfig title sl footer =
|
||||
drawOptions ldps cfig title sl =
|
||||
pictures
|
||||
[ darkenBackground cfig
|
||||
, drawTitle cfig title
|
||||
, drawFooterText cfig red footer
|
||||
, drawSelectionList ldps cfig sl
|
||||
]
|
||||
|
||||
@@ -79,12 +57,6 @@ drawTitle cfig = winScale cfig . translate (30 - hw) (hh-50) . scale 0.4 0.4 . t
|
||||
hh = halfHeight cfig
|
||||
hw = halfWidth cfig
|
||||
|
||||
--drawTitle' :: Configuration -> String -> Picture
|
||||
--drawTitle' cfig = placeString (- hw + 30) (hh - 50) 0.4
|
||||
-- where
|
||||
-- hh = halfHeight cfig
|
||||
-- hw = halfWidth cfig
|
||||
|
||||
placeString ::
|
||||
-- | x distance from center
|
||||
Float ->
|
||||
|
||||
Reference in New Issue
Block a user