Cleanup
This commit is contained in:
@@ -69,20 +69,6 @@ mouseClickOptionsList u = fromMaybe u $ do
|
||||
return $ f u
|
||||
_ -> Nothing
|
||||
|
||||
--mouseClickOptionsList u = fromMaybe u $ do
|
||||
-- sl <- u ^? uvScreenLayers . ix 0 . scSelectionList
|
||||
-- Just $ case u ^. uvWorld . input . mouseButtons . at ButtonLeft of
|
||||
-- Just 0 -> fromMaybe u $ do
|
||||
-- i <- u ^? uvWorld . input . mouseContext . mcoMenuClick
|
||||
-- f <- sl ^? ix i . siPayload . _1
|
||||
-- return $ f u
|
||||
-- _ -> case u ^. uvWorld . input . mouseButtons . at ButtonRight of
|
||||
-- Just 0 -> fromMaybe u $ do
|
||||
-- i <- u ^? uvWorld . input . mouseContext . mcoMenuClick
|
||||
-- f <- sl ^? ix i . siPayload . _2
|
||||
-- return $ f u
|
||||
-- _ -> u
|
||||
|
||||
ldpVerticalSelection :: Configuration -> ListDisplayParams -> Point2 -> Maybe Int
|
||||
ldpVerticalSelection cfig ldp (V2 _ y)
|
||||
| yupper == ylower = Just yupper
|
||||
@@ -96,24 +82,6 @@ ldpVerticalSelection cfig ldp (V2 _ y)
|
||||
yupper = floor $ (top - (y + ygap)) / yoff
|
||||
ylower = ceiling ((top - y) / yoff) - 1
|
||||
|
||||
--menuWheelEvents :: Universe -> Universe
|
||||
--menuWheelEvents u = foldr ($) u (replicate (abs y) (menuWheelStep (signum y)))
|
||||
-- where
|
||||
-- y = u ^. uvWorld . input . scrollAmount
|
||||
|
||||
---- you probably want i to be 1 or -1
|
||||
--menuWheelStep :: Int -> Universe -> Universe
|
||||
--menuWheelStep i u = fromMaybe u $ do
|
||||
-- sl <- u ^? uvScreenLayers . _head . scSelectionList
|
||||
-- selpos <- sl ^? slSelPos . _Just
|
||||
-- ymax <- fmap length (sl ^? slItems)
|
||||
-- let newpos = (selpos - i) `mod` ymax
|
||||
-- itm <- sl ^? slItems . ix newpos
|
||||
-- let newu = u & uvScreenLayers . _head . scSelectionList . slSelPos . _Just %~ const newpos
|
||||
-- if _siIsSelectable itm
|
||||
-- then Just newu
|
||||
-- else Just $ menuWheelStep i newu
|
||||
|
||||
setSelectionListRestriction :: Configuration -> ScreenLayer -> ScreenLayer
|
||||
setSelectionListRestriction cfig screen = fromMaybe screen $ do
|
||||
ldps <- screen ^? scListDisplayParams
|
||||
|
||||
Reference in New Issue
Block a user