initial framework added
[fp1415-soccerfun.git] / src / Gui / render.icl
1 implementation module render
2
3 import StdIOCommon, StdPicture, StdPSt
4 import matchControl
5 import renderGameFlatlandish // the default rendering style
6 import renderGameFixCamera // 2.5D rendering with fixed camera and angles at south-east
7
8 instance nameOf RenderStyle where nameOf style = style.RenderStyle.name
9
10 allRenderStyles :: [RenderStyle]
11 allRenderStyles = [ renderFlatland
12 , renderFixCamera
13 ]
14
15 green :== RGB {r=30,g=140,b=40} // dark green works better on a beamer
16 home_colour :== RGB {r=255,g=255,b=70} // yellow works well on dark green background
17 away_colour :== RGB {r=102,g=255,b=255}
18
19 WestColour :: Colour
20 WestColour = home_colour
21
22 EastColour :: Colour
23 EastColour = away_colour
24
25 renderAttributes :: !*env -> (![PenAttribute],!*env) | accScreenPicture env
26 renderAttributes env = accScreenPicture attributes env
27 where
28 attributes :: !*Picture -> (![PenAttribute],!*Picture)
29 attributes picture
30 # ((_,font),picture)= openFont SmallFontDef picture
31 = ([PenBack green,PenFont font],picture)