Simplify menu display
This commit is contained in:
@@ -3,6 +3,7 @@ module Dodge.Update.Input.ScreenLayer (
|
||||
ldpVerticalSelection,
|
||||
) where
|
||||
|
||||
import Dodge.ListDisplayParams
|
||||
import Control.Monad
|
||||
import Data.Char
|
||||
import qualified Data.Map.Strict as M
|
||||
@@ -83,6 +84,8 @@ ldpVerticalSelection cfig ldp (V2 _ y)
|
||||
ylower = ceiling ((top - y) / yoff) - 1
|
||||
|
||||
setSelectionListRestriction :: Configuration -> ScreenLayer -> ScreenLayer
|
||||
setSelectionListRestriction cfig screen = fromMaybe screen $ do
|
||||
ldps <- screen ^? scListDisplayParams
|
||||
return $ screen & scAvailableLines %~ const (getAvailableListLines ldps cfig)
|
||||
setSelectionListRestriction cfig screen =
|
||||
screen & scAvailableLines %~ const (getAvailableListLines optionListDisplayParams cfig)
|
||||
-- fromMaybe screen $ do
|
||||
-- ldps <- screen ^? scListDisplayParams
|
||||
-- return $ screen & scAvailableLines %~ const (getAvailableListLines ldps cfig)
|
||||
|
||||
Reference in New Issue
Block a user