aboutsummaryrefslogtreecommitdiffstats
path: root/examples/counter.aup
diff options
context:
space:
mode:
Diffstat (limited to 'examples/counter.aup')
-rw-r--r--examples/counter.aup9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/counter.aup b/examples/counter.aup
new file mode 100644
index 0000000..d966292
--- /dev/null
+++ b/examples/counter.aup
@@ -0,0 +1,9 @@
+# Space increments a count; views expose what a surface would show.
+state count = 0
+input tap = key Space
+view label = count
+view tile_width = 40 + min(count, 20) * 8
+
+on tap.down {
+ count = count + 1
+}