Improve mouse menu controls, tweak charmap
This commit is contained in:
+16
-14
@@ -1,7 +1,7 @@
|
||||
module Dodge.Menu.Option
|
||||
where
|
||||
--import Dodge.ScodeToChar
|
||||
import Data.Maybe
|
||||
--import Data.Maybe
|
||||
import Dodge.WindowLayout
|
||||
import Padding
|
||||
import Picture.Base
|
||||
@@ -18,11 +18,13 @@ slTitleOptionsEff title ops defstr eff u =
|
||||
, _scOptions = ops
|
||||
, _scMaybeOption = fmap (Toggle eff . const . MODString) defstr
|
||||
, _scOptionFlag = NormalOptions
|
||||
, _scSelectionList = makeOptionsSelectionList (Just 0) u ops defstr
|
||||
, _scSelectionList = makeOptionsSelectionList (Just 0) u ops
|
||||
}
|
||||
|
||||
makeOptionsSelectionList :: Maybe Int -> Universe -> [MenuOption] -> Maybe String -> SelectionList
|
||||
makeOptionsSelectionList mselpos u mos defstr = SelectionList
|
||||
--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
|
||||
, _slPosY = 50
|
||||
, _slOffset = 0
|
||||
@@ -36,16 +38,16 @@ makeOptionsSelectionList mselpos u mos defstr = SelectionList
|
||||
, _slLength = length $ optionsToSelections u mos
|
||||
, _slSizeRestriction = SelectionSizeRestriction (availableMenuLines cfig) overflowit overflowit
|
||||
(SSRFromScreenBottom 5)
|
||||
, _slSpecialItem = fromMaybe NoSpecialSelectionItem $ do
|
||||
str <- defstr
|
||||
return $ BottomSelectionItem SelectionItem
|
||||
{ _siPictures = [color white $ text str]
|
||||
, _siHeight = 1
|
||||
, _siIsSelectable = True
|
||||
, _siWidth = length str
|
||||
, _siColor = white
|
||||
, _siOffX = 0
|
||||
}
|
||||
-- , _slSpecialItem = fromMaybe NoSpecialSelectionItem $ do
|
||||
-- str <- defstr
|
||||
-- return $ BottomSelectionItem SelectionItem
|
||||
-- { _siPictures = [color white $ text str]
|
||||
-- , _siHeight = 1
|
||||
-- , _siIsSelectable = True
|
||||
-- , _siWidth = length str
|
||||
-- , _siColor = white
|
||||
-- , _siOffX = 0
|
||||
-- }
|
||||
}
|
||||
where
|
||||
cfig = u ^. uvConfig
|
||||
|
||||
Reference in New Issue
Block a user