Work on combine cursors
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
module Dodge.Render.List where
|
||||
|
||||
--import Picture.Text
|
||||
import Dodge.Inventory
|
||||
import SelectionIntMap
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
--import Data.Foldable
|
||||
@@ -109,6 +110,13 @@ stackPicturesAt tx ty cfig = stackPicturesAtOff tx ty cfig 0
|
||||
stackPicturesAtOff :: Float -> Float -> Configuration -> Int -> [Picture] -> Picture
|
||||
stackPicturesAtOff tx ty cfig i = mconcat . zipWith (listTextPictureAt tx ty cfig) [i, i -1 ..]
|
||||
|
||||
selSecDrawCursor :: Int -> [CardinalPoint] -> Configuration -> ListDisplayParams -> SelectionSections a -> Int -> Int -> Picture
|
||||
selSecDrawCursor xsize borders cfig ldp sss i j = fromMaybe mempty $ do
|
||||
yint <- selSecSelPos i j sss
|
||||
xint <- sss ^? sssSections . ix i . ssIndent
|
||||
si <- sss ^? sssSections . ix i . ssItems . ix j
|
||||
return $ listCursorDisplayParams ldp borders cfig yint xint (_siColor si) xsize (length $ _siPictures si)
|
||||
|
||||
listCursorDisplayParams ::
|
||||
ListDisplayParams ->
|
||||
[CardinalPoint] ->
|
||||
@@ -153,7 +161,7 @@ listCursorChooseBorderScale ygap s borders xoff yoff cfig yint xint col cursxsiz
|
||||
where
|
||||
x = 9
|
||||
wth = x * fromIntegral cursxsize + 9
|
||||
hgt = 20 * fromIntegral cursysize
|
||||
hgt = 20 * fromIntegral cursysize -- TODO this should be changed!
|
||||
|
||||
-- displays a cursor that should match up to list text pictures
|
||||
-- the width of a character appears to be 9(?!)
|
||||
|
||||
Reference in New Issue
Block a user