aboutsummaryrefslogtreecommitdiffstats
path: root/examples/toggle.aup
blob: 39417cc56855193b9d738084b6215dc574b4d8b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Space toggles visibility; Right arrow moves a position that wraps.
state visible = 1
state position = 120
input toggle = key Space
input move = key ArrowRight
view marker_x = position
view marker_radius = visible * 24
view tile_x = position - 24
view value = visible

on toggle.down {
  visible = !visible
}

on move.down {
  position = position + 40
  if position > 560 {
    position = 80
  }
}