-
-
Save zoffixznet/78914f5253e0dac19eef5418074315bf to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env perl6 | |
use GTK::Simple; | |
use GTK::Simple::App; | |
my \app := GTK::Simple::App.new: title => 'ZofVLC'; | |
my \b := {}; | |
app.set-content: | |
GTK::Simple::VBox.new: | |
(b<hello> := GTK::Simple::Button.new: label => "Hello World!"), | |
(b<exit> := GTK::Simple::Button.new: label => "Goodbye!"); | |
app.border-width = 20; | |
b<exit>.sensitive = False; | |
react { | |
whenever b<hello>.clicked { | |
say "O hai"; | |
b<exit>.sensitive = True; | |
} | |
whenever b<exit>.clicked { | |
app.exit | |
} | |
start { | |
app.run; | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment