ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/UI.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.225 by root, Tue May 23 21:14:41 2006 UTC vs.
Revision 1.226 by root, Tue May 23 23:14:46 2006 UTC

2312 2312
2313 $self->{need_reflow}++; 2313 $self->{need_reflow}++;
2314 $self->update; 2314 $self->update;
2315} 2315}
2316 2316
2317sub clear {
2318 my ($self) = @_;
2319
2320 $self->{par} = [];
2321 $self->{height} = 0;
2322
2323 $self->reflow;
2324}
2325
2317sub add_paragraph { 2326sub add_paragraph {
2318 my ($self, $color, $text, $indent) = @_; 2327 my ($self, $color, $text, $indent) = @_;
2319
2320 #TODO: intelligently "reformat" paragraph
2321 2328
2322 for my $line (split /\n/, $text) { 2329 for my $line (split /\n/, $text) {
2323 my $height = $self->text_height ($line); 2330 my $height = $self->text_height ($line);
2324 $self->{height} += $height; 2331 $self->{height} += $height;
2325 push @{$self->{par}}, [$height, $color, $indent, $line]; 2332 push @{$self->{par}}, [$height, $color, $indent, $line];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines