Push more data out of selection list into menu screen
This commit is contained in:
@@ -2,7 +2,7 @@ module Dodge.Menu.Option
|
||||
where
|
||||
--import Dodge.ScodeToChar
|
||||
--import Data.Maybe
|
||||
import Dodge.WindowLayout
|
||||
--import Dodge.WindowLayout
|
||||
import Padding
|
||||
import Picture.Base
|
||||
import Dodge.Data.CardinalPoint
|
||||
@@ -20,6 +20,7 @@ slTitleOptionsEff title ops defstr eff u =
|
||||
, _scMaybeOption = fmap (Toggle eff . const . MODString) defstr
|
||||
, _scOptionFlag = NormalOptions
|
||||
, _scSelectionList = makeOptionsSelectionList (Just 0) u ops
|
||||
, _scAvailableLines = 10
|
||||
}
|
||||
|
||||
refreshOptionsSelectionList :: Universe -> Universe
|
||||
@@ -29,9 +30,6 @@ refreshOptionsSelectionList u = u & uvScreenLayers . ix 0 %~ f
|
||||
OptionScreen {_scOptions = mops} -> sl & scSelectionList . slItems .~ optionsToSelections u mops
|
||||
_ -> sl
|
||||
|
||||
|
||||
--makeOptionsSelectionList :: Maybe Int -> Universe -> [MenuOption] -> Maybe String -> SelectionList
|
||||
--makeOptionsSelectionList mselpos u mos defstr = SelectionList
|
||||
makeOptionsSelectionList :: Maybe Int -> Universe -> [MenuOption] -> SelectionList
|
||||
makeOptionsSelectionList mselpos u mos = SelectionList
|
||||
{ _slPosX = 50
|
||||
@@ -44,8 +42,7 @@ makeOptionsSelectionList mselpos u mos = SelectionList
|
||||
, _slCursorType = BorderCursor (Set.fromList [North,South,West])
|
||||
, _slWidth = FixedSelectionWidth 15
|
||||
, _slLength = length $ optionsToSelections u mos
|
||||
, _slSizeRestriction = SelectionSizeRestriction (availableMenuLines cfig) overflowit overflowit
|
||||
(SSRFromScreenBottom 5)
|
||||
, _slSizeRestriction = SelectionSizeRestriction overflowit
|
||||
-- , _slSpecialItem = fromMaybe NoSpecialSelectionItem $ do
|
||||
-- str <- defstr
|
||||
-- return $ BottomSelectionItem SelectionItem
|
||||
@@ -58,7 +55,6 @@ makeOptionsSelectionList mselpos u mos = SelectionList
|
||||
-- }
|
||||
}
|
||||
where
|
||||
cfig = u ^. uvConfig
|
||||
overflowit = SelectionItem
|
||||
{ _siPictures = [text "MORE OPTIONS"]
|
||||
, _siHeight = 1
|
||||
|
||||
Reference in New Issue
Block a user