Tickit::Widget::Spinner - a widget displaying a small text animation
Tickit::Widget::Spinner
use Tickit; use Tickit::Widget::Spinner; my $spinner = Tickit::Widget::Spinner->new( chars => [ "<X> ", " <X> ", " <X>", "> <X", "X> <" ], ); Tickit->new( root => $spinner )->run;
This class provides a widget which displays a simple animation, cycling through a fixed set of strings with a fixed interval.
The default style pen is used as the widget pen.
$spinner = Tickit::Widget::Spinner->new( %args )
Constructs a new Tickit::Widget::Spinner object.
Takes the following named arguments:
Optional. An ARRAY reference containing the text strings to use.
Optional. The time each string is displayed for. Defaults to 0.5.
$spinner->start
Starts the animation effect.
$spinner->stop
Stops the animation effect.
Paul Evans <leonerd@leonerd.org.uk>
To install Tickit::Widgets, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit::Widgets
CPAN shell
perl -MCPAN -e shell install Tickit::Widgets
For more information on module installation, please visit the detailed CPAN module installation guide.