Improve terminal color possibilities
This commit is contained in:
@@ -3,6 +3,7 @@ module Dodge.Render.List (
|
||||
renderListAt,
|
||||
drawList,
|
||||
drawSelectionList,
|
||||
drawSelectionListBackground,
|
||||
drawListYgapScaleYoff,
|
||||
drawListElement,
|
||||
selSecDrawCursor,
|
||||
@@ -12,8 +13,10 @@ module Dodge.Render.List (
|
||||
toTopLeft,
|
||||
listCursorChooseBorderScale,
|
||||
selSecDrawCursorAt,
|
||||
drawTitleBackground, -- should be renamed, made sensible
|
||||
) where
|
||||
|
||||
import Dodge.ListDisplayParams
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Data.Maybe
|
||||
import Dodge.Base.Window
|
||||
@@ -41,6 +44,20 @@ drawSelectionList ldps cfig sl =
|
||||
ldps
|
||||
(BoundaryCursor [North, South])
|
||||
|
||||
drawTitleBackground :: Configuration -> Picture
|
||||
drawTitleBackground cfig =
|
||||
translateScreenPos cfig (fromTopLeft (V2 (subInvX - 5) 75))
|
||||
. 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
|
||||
where
|
||||
s = - (5 + fromIntegral l * (20 * ldp ^. ldpScale + ldp ^. ldpVerticalGap))
|
||||
e = 555 -- HACK
|
||||
|
||||
makeSelectionListPictures :: SelectionList a -> [Picture]
|
||||
makeSelectionListPictures = concatMap f . _slItems
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user