Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Animation/Raku/animation.raku
Normal file
17
Task/Animation/Raku/animation.raku
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use GTK::Simple;
|
||||
use GTK::Simple::App;
|
||||
|
||||
my $app = GTK::Simple::App.new(:title<Animation>);
|
||||
my $button = GTK::Simple::Button.new(label => 'Hello World! ');
|
||||
my $vbox = GTK::Simple::VBox.new($button);
|
||||
|
||||
my $repeat = $app.g-timeout(100); # milliseconds
|
||||
|
||||
my $dir = 1;
|
||||
$button.clicked.tap({ $dir *= -1 });
|
||||
|
||||
$repeat.tap( &{$button.label = $button.label.comb.List.rotate($dir).join} );
|
||||
|
||||
$app.set-content($vbox);
|
||||
|
||||
$app.run;
|
||||
Loading…
Add table
Add a link
Reference in a new issue