This commit is contained in:
2024-11-26 23:01:17 +00:00
parent f64dc86a30
commit 9534698a24
3 changed files with 1 additions and 12 deletions
-1
View File
@@ -14,7 +14,6 @@ data ListDisplayParams = ListDisplayParams
{ _ldpPos :: ScreenPos { _ldpPos :: ScreenPos
, _ldpScale :: Float , _ldpScale :: Float
, _ldpVerticalGap :: Float , _ldpVerticalGap :: Float
, _ldpWidth :: SelectionWidth
} }
data CursorDisplay data CursorDisplay
-3
View File
@@ -3,7 +3,6 @@ module Dodge.ListDisplayParams (
invCursorParams, invCursorParams,
secondColumnParams, secondColumnParams,
subInvX, subInvX,
defaultListDisplayParams,
optionListDisplayParams, optionListDisplayParams,
) where ) where
@@ -26,7 +25,6 @@ defaultListDisplayParams =
{ _spScreenOff = V2 (-0.5) 0.5 -- top left { _spScreenOff = V2 (-0.5) 0.5 -- top left
, _spPixelOff = 0 , _spPixelOff = 0
} }
, _ldpWidth = UseItemWidth
} }
invDP :: ListDisplayParams invDP :: ListDisplayParams
@@ -59,4 +57,3 @@ optionListDisplayParams =
& ldpPos . spPixelOff .~ V2 11 (-70) & ldpPos . spPixelOff .~ V2 11 (-70)
& ldpScale .~ 2 & ldpScale .~ 2
& ldpVerticalGap .~ 0 & ldpVerticalGap .~ 0
& ldpWidth .~ FixedSelectionWidth 50
+1 -8
View File
@@ -90,12 +90,6 @@ drawCursorAt mi lis ldps width curs = fromMaybe mempty $ do
width width
(_siHeight selit) (_siHeight selit)
getLDPWidth :: ListDisplayParams -> Int -> Int -> IM.IntMap (SelectionSection a) -> Int
getLDPWidth ldps i j sss = case _ldpWidth ldps of
FixedSelectionWidth x -> x
-- UseMaxSelectionItemWidth -> a
UseItemWidth -> fromMaybe 0 $ sss ^? ix i . ssItems . ix j . siWidth
drawListYoff :: Int -> [Picture] -> Picture drawListYoff :: Int -> [Picture] -> Picture
drawListYoff = drawListYgapScaleYoff 0 1 drawListYoff = drawListYgapScaleYoff 0 1
@@ -119,7 +113,6 @@ selSecDrawCursorAt ldp curs sss (i, j) = fold $ do
yint <- selSecYint i j sss yint <- selSecYint i j sss
sindent <- sss ^? ix i . ssIndent sindent <- sss ^? ix i . ssIndent
si <- sss ^? ix i . ssItems . ix j si <- sss ^? ix i . ssItems . ix j
let xsize = getLDPWidth ldp i j sss
return $ return $
listCursorChooseBorderScale listCursorChooseBorderScale
(ldp ^. ldpVerticalGap) (ldp ^. ldpVerticalGap)
@@ -128,7 +121,7 @@ selSecDrawCursorAt ldp curs sss (i, j) = fold $ do
yint yint
(_siOffX si + sindent) (_siOffX si + sindent)
(_siColor si) (_siColor si)
xsize (_siWidth si)
(_siHeight si) (_siHeight si)
selSecDrawCursor :: selSecDrawCursor ::