--- deliantra/Deliantra-Client/DC/UI.pm 2007/07/21 20:05:37 1.401 +++ deliantra/Deliantra-Client/DC/UI.pm 2007/07/21 20:49:44 1.402 @@ -1797,8 +1797,8 @@ $x = _scale $pos, $x, $W; $y = _scale $pos, $x, $H; - $w = _scale $size, $w, $child->{req_w}; - $h = _scale $size, $h, $child->{req_h}; + $w = _scale $size, $w, $W; + $h = _scale $size, $h, $H; $child->configure ($x, $y, $w, $h); } @@ -3542,6 +3542,7 @@ if ($::CONN) { if (my $faceid = $::CONN->{faceid}[$self->{face}]) { if (my $tex = $::CONN->{texture}[$faceid]) { + $self->{tex} = $tex; return ($self->{size_w} || $tex->{w}, $self->{size_h} || $tex->{h}); } else { $self->{wait_face} ||= $::CONN->connect_face_update ($faceid, sub { @@ -3573,16 +3574,9 @@ sub _draw { my ($self) = @_; - return unless $::CONN; - $self->SUPER::_draw; - my $faceid = $::CONN->{faceid}[$self->{face}] - or return; - - my $tex = $::CONN->{texture}[$faceid]; - - if ($tex) { + if (my $tex = $self->{tex}) { glEnable GL_TEXTURE_2D; glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; glColor 0, 0, 0, 1;