Jeffrey T. Palmer > SDLx-Widget-0.072 > SDLx::Widget::Textbox

Download:
SDLx-Widget-0.072.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.072   Source  

NAME ^

SDLx::Widget::Textbox - create text boxes for your SDL apps easily

SYNOPSIS ^

Create a simple SDL text for your SDLx::App:

    $textbox = SDLx::Widget::Textbox->new(app => $app, x => 200, y => 200, w => 200, h => 20, name => 'username');
    $passbox = SDLx::Widget::Textbox->new(app => $app, x => 200, y => 230, w => 200, h => 20, name => 'password', password => 1);
    $textbox->show;
    $passbox->show;

$app is SDLx::App or SDLx::Controller.

Get the value out by:

    my $text_value = $textbox->value;

Also know if it is focused right now.

    warn 'Stop typing here!' if $textbox->focus;

METHODS ^

event_handler( $event )

show( $surface )

SEE ALSO ^

SDL, SDLx::App, SDLx::Controller

syntax highlighting: