This commit is contained in:
2025-12-24 16:43:36 +00:00
parent 8cd2625548
commit a1c20c56ce
4 changed files with 70 additions and 69 deletions
+7 -4
View File
@@ -19,6 +19,7 @@ module Dodge.Render.List (
drawLabelledList,
) where
import Dodge.Data.HUD
import qualified Data.IntMap.Strict as IM
import Data.Maybe
import Dodge.Base.Window
@@ -105,8 +106,10 @@ stackPicturesAtOff :: Int -> [Picture] -> Picture
stackPicturesAtOff i = mconcat . zipWith (drawListElement 10 1 0) [i, i - 1 ..]
selSecDrawCursorAt ::
LDParams -> CursorDisplay -> IM.IntMap (SelSection a) -> (Int, Int) -> Picture
selSecDrawCursorAt ldp curs sss (i, j) = fold $ do
LDParams -> CursorDisplay -> IM.IntMap (SelSection a) -> Selection -> Picture
selSecDrawCursorAt ldp curs sss sel = fold $ do
let i = sel ^. slSec
j = sel ^. slInt
yint <- selSecYint i j sss
sindent <- sss ^? ix i . ssIndent
si <- sss ^? ix i . ssItems . ix j
@@ -122,8 +125,8 @@ selSecDrawCursorAt ldp curs sss (i, j) = fold $ do
(_siHeight si)
selSecDrawCursor ::
LDParams -> CursorDisplay -> IM.IntMap (SelSection a) -> Maybe (Int, Int) -> Picture
selSecDrawCursor ldp curs = maybe mempty . selSecDrawCursorAt ldp curs
LDParams -> CursorDisplay -> IM.IntMap (SelSection a) -> Maybe Selection -> Picture
selSecDrawCursor ldp cd = maybe mempty . selSecDrawCursorAt ldp cd
-- displays a cursor that should match up to list text pictures
listCursorChooseBorderScale ::