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.291 by root, Tue Jun 6 02:55:50 2006 UTC vs.
Revision 1.292 by root, Tue Jun 6 03:02:15 2006 UTC

2506 $self->SUPER::size_allocate ($w, $h); 2506 $self->SUPER::size_allocate ($w, $h);
2507 2507
2508 $self->{layout}->set_font ($self->{font}) if $self->{font}; 2508 $self->{layout}->set_font ($self->{font}) if $self->{font};
2509 $self->{layout}->set_height ($self->{fontsize} * $::FONTSIZE); 2509 $self->{layout}->set_height ($self->{fontsize} * $::FONTSIZE);
2510 $self->{layout}->set_width ($self->{children}[0]{w}); 2510 $self->{layout}->set_width ($self->{children}[0]{w});
2511 $self->{layout}->set_indent (-$self->{fontsize} * $::FONTSIZE * 4);
2511 2512
2512 $self->reflow; 2513 $self->reflow;
2513} 2514}
2514 2515
2515sub text_size { 2516sub text_size {
2517 2518
2518 my $layout = $self->{layout}; 2519 my $layout = $self->{layout};
2519 2520
2520 $layout->set_height ($self->{fontsize} * $::FONTSIZE); 2521 $layout->set_height ($self->{fontsize} * $::FONTSIZE);
2521 $layout->set_width ($self->{children}[0]{w} - $indent); 2522 $layout->set_width ($self->{children}[0]{w} - $indent);
2523 $layout->set_indent (-$self->{fontsize} * $::FONTSIZE * 4);
2522 $layout->set_markup ($text); 2524 $layout->set_markup ($text);
2523 2525
2524 $layout->size 2526 $layout->size
2525} 2527}
2526 2528
2578 $layout->set_height ($self->{fontsize} * $::FONTSIZE); 2580 $layout->set_height ($self->{fontsize} * $::FONTSIZE);
2579 2581
2580 for (@{$self->{par}}) { 2582 for (@{$self->{par}}) {
2581 if (1 || $_->[0] >= $W) { # TODO: works,but needs reconfigure etc. support 2583 if (1 || $_->[0] >= $W) { # TODO: works,but needs reconfigure etc. support
2582 $layout->set_width ($W - $_->[3]); 2584 $layout->set_width ($W - $_->[3]);
2585 $layout->set_indent (-$self->{fontsize} * $::FONTSIZE * 4);
2583 $layout->set_markup ($_->[4]); 2586 $layout->set_markup ($_->[4]);
2584 my ($w, $h) = $layout->size; 2587 my ($w, $h) = $layout->size;
2585 $_->[0] = $w + $_->[3]; 2588 $_->[0] = $w + $_->[3];
2586 $_->[1] = $h; 2589 $_->[1] = $h;
2587 } 2590 }
2619 my $h = $par->[1]; 2622 my $h = $par->[1];
2620 2623
2621 if ($y0 < $y + $h && $y < $y1) { 2624 if ($y0 < $y + $h && $y < $y1) {
2622 $layout->set_foreground (@{ $par->[2] }); 2625 $layout->set_foreground (@{ $par->[2] });
2623 $layout->set_width ($W - $par->[3]); 2626 $layout->set_width ($W - $par->[3]);
2627 $layout->set_indent (-$self->{fontsize} * $::FONTSIZE * 4);
2624 $layout->set_markup ($par->[4]); 2628 $layout->set_markup ($par->[4]);
2625 2629
2626 my ($w, $h, $data, $format, $internalformat) = $layout->render; 2630 my ($w, $h, $data, $format, $internalformat) = $layout->render;
2627 2631
2628 glRasterPos $par->[3], $y - $y0; 2632 glRasterPos $par->[3], $y - $y0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines