Dear all!

I want to replace an SDLx::Text by some other text.
Do I have to redraw the whole surface that was covered by the old text in
order to "replace" it by a new text?

The following script demonstrates my problem:

[code]
#!perl

use strict;
use warnings;
use SDL;

use SDL;
use SDLx::App; 
use SDLx::Text;

my $app = SDLx::App->new(
        exit_on_quit => 1,
);

my $message = SDLx::Text->new;

$message->write_to( $app, "Hello, World!" );
$app->update;

$message->text('Susan');
$message->write_to( $app );
$app->update();

$app->run();
[/code]

First, the text "Hello World!" is drawn to the surface. Then, I alter the
text and draw it again. But the old hello world text still remains on the
surface. 
I don't want that. I want "Hello World!" to disappear and Susan so show up.

How do I do that?

Best regards,
Alex

Reply via email to