Last active
March 23, 2016 21:13
-
-
Save ethagnawl/a09b8c9abc58495e1fc2 to your computer and use it in GitHub Desktop.
sharing actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ColorPicker where | |
type Action = | |
InitialsSaved Bool | |
| Noop | |
view address model = | |
let | |
context = View.Context | |
(Signal.forwardTo address (InitialsSaved)) | |
in | |
View.view context model | |
app = | |
StartApp.start { | |
init = (init, Effects.none), | |
view = view, | |
update = update, | |
inputs = [incomingGameObject] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module View (view, Context) where | |
type alias Context = | |
{ | |
initialsSaved : Signal.Address Bool | |
} | |
view context model = | |
button | |
[onClick context.initialsSaved True] | |
[text "Play!"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment