on master help sign in
updated syntax in the mouse example
commite0d565005a21efdc98ba8b3903807fa501f68ca1 authorVladimir Bychkovsky <vladimir.bychkovsky@gmail.com> dateThu 7 Feb 2013, 22:18 (14 years ago) parent33831db
1 file changed+4−4
Examples/elm-happstack/elm_source/mouse.elm+4−4
Examples/elm-happstack/elm_source/mouse.elm+4−4
@@ -1,15 +1,15 @@
11
22-- Move your mouse around above the canvas!
33
4−import Signal.Mouse (position)
5−import Signal.Window (dimensions)
4+import Mouse (position)
5+import Window (dimensions)
66
77myBlue = rgb 0 85 170
88myGreen = rgba 28 267 85 (1/2)
99
1010scene (x,y) (w,h) =
11− collage w h [ filled myBlue . rotate ((x+y)/1000) $ ngon 4 100 (200,200)
11+ collage w h [ rotate (toFloat (x+y) / 1000) $ filled myBlue $ ngon 4 100 (200,200)
1212 , filled myGreen $ ngon 5 30 (x,y)
1313 ]
1414
15−main = lift2 scene position dimensions
15+main = lift2 scene Mouse.position Window.dimensions