aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gui.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-02-16 11:47:24 +0000
committers-ol <s-ol@users.noreply.github.com>2020-02-16 11:47:24 +0000
commit2953f1e56b408fc26eb54fa65935505dd128ce82 (patch)
tree8c7c513ccf03df06c4e9e2e70ba68031d2d0b7a5 /lib/gui.moon
parentadd ==, mod (diff)
downloadalive-2953f1e56b408fc26eb54fa65935505dd128ce82.tar.gz
alive-2953f1e56b408fc26eb54fa65935505dd128ce82.zip
major refactoring: Const, Stream + ResultNode
Diffstat (limited to 'lib/gui.moon')
-rw-r--r--lib/gui.moon9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/gui.moon b/lib/gui.moon
index a2fee4b..474de5c 100644
--- a/lib/gui.moon
+++ b/lib/gui.moon
@@ -12,12 +12,11 @@ display value as a bar"
setup: (name, @chld) =>
@@instances[@name] = nil if @name
- @name = name\getc!
+ @name = name\const!\unwrap!
@@instances[@name] = @
update: (dt) =>
- @chld\update dt
- @value = @chld\get!
+ @value = @chld\unwrap!
destroy: =>
@@instances[@name] = nil
@@ -44,9 +43,11 @@ class key extends Op
setup: (@key) =>
assert @key
+ @out = Stream 'bool', false
+ @out
update: (dt) =>
- @value = lk.isDown @key\get!
+ @out\set lk.isDown @key\unwrap!
arguments, k = {}
for a in *arg