Last active
January 10, 2019 07:52
-
-
Save Phryxe/f6608401a6bc385c09aeebf82fd3303e to your computer and use it in GitHub Desktop.
Red Language Test
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
Red [] | |
x: [ | |
["01" "A"] | |
["02" "B"] | |
["03" "C"] | |
["04" "D"] | |
["05" "E"] | |
["06" "F"] | |
["07" "G"] | |
["08" "H"] | |
["09" "I"] | |
["10" "J"] | |
["11" "K"] | |
["12" "L"] | |
["13" "M"] | |
["14" "N"] | |
["15" "O"] | |
] | |
up?: func [y][ | |
either y [ | |
unless head? x [ | |
x: back x | |
update | |
] | |
] | |
[ | |
unless tail? skip x 5 [ | |
x: next x | |
update | |
] | |
] | |
] | |
update: func [][ | |
f1a/text: x/1/1 | |
f1b/text: x/1/2 | |
f2a/text: x/2/1 | |
f2b/text: x/2/2 | |
f3a/text: x/3/1 | |
f3b/text: x/3/2 | |
f4a/text: x/4/1 | |
f4b/text: x/4/2 | |
f5a/text: x/5/1 | |
f5b/text: x/5/2 | |
] | |
view/tight [ | |
title "Scroll Test" | |
style f: field 100 gold bold | |
across | |
f1a: f | |
f1b: f | |
return | |
f2a: f | |
f2b: f | |
return | |
f3a: f | |
f3b: f | |
return | |
f4a: f | |
f4b: f | |
return | |
f5a: f | |
f5b: f | |
return | |
button 100 "Up" on-click [up? true] | |
button 100 "Down" on-click [up? false] | |
do [update] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment