Work on cursor for lists
This commit is contained in:
@@ -3,10 +3,10 @@ module Dodge.Render.MenuScreen (
|
||||
drawMenuScreen,
|
||||
) where
|
||||
|
||||
import Dodge.Data.SelectionList
|
||||
import Dodge.Render.List
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Data.SelectionList
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.Render.List
|
||||
import Picture
|
||||
|
||||
drawMenuScreen :: Configuration -> ScreenLayer -> Picture
|
||||
@@ -15,7 +15,7 @@ drawMenuScreen cfig screen = case screen of
|
||||
drawOptions ldps cfig titf selpos
|
||||
InputScreen inputstr help -> drawInputMenu cfig ('>' : inputstr) help
|
||||
|
||||
drawInputMenu ::
|
||||
drawInputMenu ::
|
||||
Configuration ->
|
||||
-- | Title
|
||||
String ->
|
||||
@@ -23,7 +23,7 @@ drawInputMenu ::
|
||||
String ->
|
||||
Picture
|
||||
drawInputMenu cfig title footer =
|
||||
pictures
|
||||
pictures
|
||||
[ darkenBackground cfig
|
||||
, drawTitle cfig title
|
||||
, drawFooterText cfig red footer
|
||||
@@ -38,17 +38,15 @@ drawOptions ::
|
||||
SelectionList a ->
|
||||
Picture
|
||||
drawOptions ldps cfig title sl =
|
||||
pictures
|
||||
[ darkenBackground cfig
|
||||
, drawTitle cfig title
|
||||
, drawSelectionList ldps cfig sl
|
||||
]
|
||||
darkenBackground cfig
|
||||
<> drawTitle cfig title
|
||||
<> drawSelectionList ldps cfig sl
|
||||
|
||||
darkenBackground :: Configuration -> Picture
|
||||
darkenBackground = color (withAlpha 0.5 black) . polygon . reverse . screenBox
|
||||
|
||||
drawTitle :: Configuration -> String -> Picture
|
||||
drawTitle cfig = translate (30 - hw) (hh-50) . scale 0.4 0.4 . text
|
||||
drawTitle cfig = translate (- hw) (hh -80) . scale 0.4 0.4 . text
|
||||
where
|
||||
hh = halfHeight cfig
|
||||
hw = halfWidth cfig
|
||||
|
||||
Reference in New Issue
Block a user