Created
March 12, 2018 00:34
-
-
Save greggirwin/fd4543f99e257ae1338bbf5eb44dd12c to your computer and use it in GitHub Desktop.
GUI dropper 2 (drop real faces)
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 [ | |
Purpose: "Show how to drop (real) faces to make a GUI." | |
] | |
btn-pos: 700x10 | |
n: 0 | |
view [ | |
size 800x600 | |
at btn-pos | |
btn: button "Button" loose on-drop [ | |
n: n + 1 | |
name: append copy "Button " n | |
p: face/offset | |
new-face: make face! [ | |
type: 'button | |
offset: p | |
text: name | |
size: btn/size | |
options: [drag-on: 'down] | |
actors: make object! [ | |
on-click: func [face [object!] event [event! none!]][ | |
print face/text | |
] | |
] | |
] | |
append face/parent/pane new-face | |
; print mold face/parent/pane | |
btn/offset: btn-pos | |
] | |
] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment