sub mousebuttondown { my $self = shift; my $event = shift; my $app = $self->app(); say "mousebutton"; say '<' . $event->button_x() . ',' . $event->button_x() . '>'; my $r_width = 10; my $r_height = 10; my $rect = SDL::Rect->new( -height => $r_height, -width => $r_width, -x => $event->button_x() - $r_width/2, -y => $event->button_y() - $r_height/2, ); my $color = SDL::Color->new( -r => 0x00, -g => 0x00, -b => 0xff, ); $app->fill( $rect, $color ); $app->update( $rect ); } # /mousebuttondown