--- deliantra/Deliantra-Client/DC/UI.pm 2006/05/14 22:24:16 1.204 +++ deliantra/Deliantra-Client/DC/UI.pm 2006/05/15 00:15:08 1.205 @@ -377,7 +377,7 @@ glVertex 0 , $self->{h}; glEnd; glPopMatrix; - CFClient::UI::Label->new (w => $self->{w}, h => $self->{h}, text => $self, fontsize => 0)->_draw; + #CFClient::UI::Label->new (w => $self->{w}, h => $self->{h}, text => $self, fontsize => 0)->_draw; } } @@ -2691,7 +2691,7 @@ for ($short) { s/^\s+//; - s/\012.*/…/s; + s/\s+/ /g; my $len = int 40 / $item->{fontsize}; substr $_, $len, length, "…" if $len < length; } @@ -2702,7 +2702,7 @@ tooltip_font => $::FONT_PROP, tooltip_width => 0.67, fontsize => $item->{fontsize}, - color => $item->{color}, + fg => $item->{fg}, can_events => 1, can_hover => 1 }; @@ -2739,7 +2739,7 @@ timeout => $timeout, tooltip => $text, fontsize => 0.8, - color => [0.8, 0.8, 0.8, 0.8], + fg => [0.8, 0.8, 0.8, 0.8], pri => 0, count => 1, %arg, @@ -2797,8 +2797,15 @@ for my $child ($self->children) { my ($X, $Y, $W, $H) = @$child{qw(x y req_w req_h)}; - $X = List::Util::max 0, List::Util::min $w - $W, $X; - $Y = List::Util::max 0, List::Util::min $h - $H, $Y; + $X = $child->{req_x} > 0 ? $child->{req_x} : $w - $W - $child->{req_x} + 1 + if exists $child->{req_x}; + + $Y = $child->{req_y} > 0 ? $child->{req_y} : $h - $H - $child->{req_y} + 1 + if exists $child->{req_y}; + + $X = List::Util::max 0, List::Util::min $w - $W, int $X + 0.5; + $Y = List::Util::max 0, List::Util::min $h - $H, int $Y + 0.5; + $child->configure ($X, $Y, $W, $H); } }