Add depth clear/check to fixed layer pictures
This commit is contained in:
+18
-13
@@ -1,4 +1,5 @@
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
|
||||
module Dodge.Render.List (
|
||||
renderListAt,
|
||||
drawList,
|
||||
@@ -17,13 +18,13 @@ module Dodge.Render.List (
|
||||
drawCursorAt,
|
||||
) where
|
||||
|
||||
import Dodge.ListDisplayParams
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Data.Maybe
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Data.CardinalPoint
|
||||
import Dodge.Data.Config
|
||||
import Dodge.Data.SelectionList
|
||||
import Dodge.ListDisplayParams
|
||||
import Dodge.ScreenPos
|
||||
import Dodge.SelectionSections
|
||||
import Geometry
|
||||
@@ -39,22 +40,24 @@ drawSelectionList ldps cfig sl =
|
||||
(ldps ^. ldpScale)
|
||||
0
|
||||
(makeSelectionListPictures sl)
|
||||
-- <> drawCursorAt
|
||||
-- (sl ^. slSelPos)
|
||||
-- (sl ^. slItems)
|
||||
-- ldps
|
||||
-- (BoundaryCursor [North, South])
|
||||
|
||||
drawTitleBackground :: Configuration -> Picture
|
||||
drawTitleBackground cfig =
|
||||
translateScreenPos cfig (fromTopLeft (V2 (subInvX - 5) 75))
|
||||
. polygon . reverse $ rectNSWE 70 0 0 560
|
||||
. polygon
|
||||
. reverse
|
||||
$ rectNSWE 70 0 0 560
|
||||
|
||||
drawSelectionListBackground :: ListDisplayParams -> Configuration ->
|
||||
Int -- list length
|
||||
-> Picture
|
||||
drawSelectionListBackground ldp cfig l = translateScreenPos cfig (ldp ^. ldpPos) .
|
||||
polygon . reverse $ rectNSWE 5 s (-5) e
|
||||
drawSelectionListBackground ::
|
||||
ListDisplayParams ->
|
||||
Configuration ->
|
||||
Int -> -- list length
|
||||
Picture
|
||||
drawSelectionListBackground ldp cfig l =
|
||||
translateScreenPos cfig (ldp ^. ldpPos)
|
||||
. polygon
|
||||
. reverse
|
||||
$ rectNSWE 5 s (-5) e
|
||||
where
|
||||
s = - (5 + fromIntegral l * (20 * ldp ^. ldpScale + ldp ^. ldpVerticalGap))
|
||||
e = 555 -- HACK isOverTerminalScreen
|
||||
@@ -191,7 +194,9 @@ drawListElement ygap s xint yint =
|
||||
. scale (s * 0.1) (s * 0.1)
|
||||
|
||||
renderListAt :: Float -> Float -> [(String, Color)] -> Picture
|
||||
renderListAt tx ty = translate tx (- ty) . drawList . map (\(str, col) -> color col $ text str)
|
||||
renderListAt tx ty = translate tx (- ty)
|
||||
. drawList
|
||||
. map (\(str, col) -> color col $ text str)
|
||||
|
||||
--inverseText :: String -> Color -> Picture
|
||||
--inverseText str col =
|
||||
|
||||
Reference in New Issue
Block a user