--- deliantra/Deliantra-Client/DC/UI.pm 2006/04/12 00:40:45 1.81 +++ deliantra/Deliantra-Client/DC/UI.pm 2006/04/12 02:00:06 1.82 @@ -135,7 +135,7 @@ $self->_size_allocate ($x, $y, $w, $h); } -# translate global koordinates to local coordinate system +# translate global coordinates to local coordinate system sub translate { my ($self, $x, $y) = @_; @@ -639,8 +639,6 @@ glBindTexture GL_TEXTURE_2D, $bg->{name}; glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; - glTexParameter GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT; - glTexParameter GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT; my $rep_x = $cw / $bg->{w}; my $rep_y = $ch / $bg->{h}; @@ -1002,7 +1000,8 @@ : $self->{align} > 0 ? $self->{w} - $tex->{w} - $self->{padding} : ($self->{w} - $tex->{w}) * 0.5; - $tex->draw_quad ($x, $self->{padding}); + glTranslate $x, $self->{padding}, 0; + $tex->draw_quad (0, 0); glDisable GL_TEXTURE_2D; glDisable GL_BLEND; @@ -1036,6 +1035,7 @@ $self->{text} = $text; $self->{layout}->set_width ($self->{w}); + $self->{layout}->set_height (List::Util::min $self->{h} - $self->{padding} * 2, $self->{height}); $text =~ s/./*/g if $self->{hidden};