Simplify menu display

This commit is contained in:
2025-01-07 00:58:23 +00:00
parent 1e7611ab81
commit fe3e0b1373
6 changed files with 19 additions and 21 deletions
+6 -3
View File
@@ -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)