@@ -0,0 +1,29 @@
1+
2+module Graphics.Input where
3+
4+buttons : a -> { button : a -> String -> Element
5+ , events : Signal a
6+ }
7+
8+button : String -> (Element, Signal ())
9+button txt =
10+ let pool = buttons ()
11+ in (pool.button () txt, pool.events)
12+
13+customButtons : a -> { button : a -> Element -> Element -> Element -> Element
14+ , events : Signal a
15+ }
16+
17+customButton : Element -> Element -> Element -> (Element, Signal ())
18+customButton up hover down =
19+ let pool = customButtons ()
20+ in (pool.button () up hover down, pool.events)
21+
22+checkBoxes : a -> { box : (Bool -> a) -> Bool -> Element
23+ , events : Signal a
24+ }
25+
26+checkBox : Bool -> (Signal Element, Signal Bool)
27+checkBox b =
28+ let cbs = checkBoxes b
29+ in (lift (cbs.box id) cbs.events, cbs.events)