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.401 by root, Sat Jul 21 20:05:37 2007 UTC vs.
Revision 1.402 by root, Sat Jul 21 20:49:44 2007 UTC

1795 for my $child ($self->visible_children) { 1795 for my $child ($self->visible_children) {
1796 my ($pos, $x, $y, $size, $w, $h) = @{ $child->{_fixed} }; 1796 my ($pos, $x, $y, $size, $w, $h) = @{ $child->{_fixed} };
1797 1797
1798 $x = _scale $pos, $x, $W; 1798 $x = _scale $pos, $x, $W;
1799 $y = _scale $pos, $x, $H; 1799 $y = _scale $pos, $x, $H;
1800 $w = _scale $size, $w, $child->{req_w}; 1800 $w = _scale $size, $w, $W;
1801 $h = _scale $size, $h, $child->{req_h}; 1801 $h = _scale $size, $h, $H;
1802 1802
1803 $child->configure ($x, $y, $w, $h); 1803 $child->configure ($x, $y, $w, $h);
1804 } 1804 }
1805 1805
1806 1 1806 1
3540 my ($self) = @_; 3540 my ($self) = @_;
3541 3541
3542 if ($::CONN) { 3542 if ($::CONN) {
3543 if (my $faceid = $::CONN->{faceid}[$self->{face}]) { 3543 if (my $faceid = $::CONN->{faceid}[$self->{face}]) {
3544 if (my $tex = $::CONN->{texture}[$faceid]) { 3544 if (my $tex = $::CONN->{texture}[$faceid]) {
3545 $self->{tex} = $tex;
3545 return ($self->{size_w} || $tex->{w}, $self->{size_h} || $tex->{h}); 3546 return ($self->{size_w} || $tex->{w}, $self->{size_h} || $tex->{h});
3546 } else { 3547 } else {
3547 $self->{wait_face} ||= $::CONN->connect_face_update ($faceid, sub { 3548 $self->{wait_face} ||= $::CONN->connect_face_update ($faceid, sub {
3548 $self->realloc; 3549 $self->realloc;
3549 }); 3550 });
3571} 3572}
3572 3573
3573sub _draw { 3574sub _draw {
3574 my ($self) = @_; 3575 my ($self) = @_;
3575 3576
3576 return unless $::CONN;
3577
3578 $self->SUPER::_draw; 3577 $self->SUPER::_draw;
3579 3578
3580 my $faceid = $::CONN->{faceid}[$self->{face}] 3579 if (my $tex = $self->{tex}) {
3581 or return;
3582
3583 my $tex = $::CONN->{texture}[$faceid];
3584
3585 if ($tex) {
3586 glEnable GL_TEXTURE_2D; 3580 glEnable GL_TEXTURE_2D;
3587 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; 3581 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE;
3588 glColor 0, 0, 0, 1; 3582 glColor 0, 0, 0, 1;
3589 $tex->draw_quad_alpha (0, 0, $self->{w}, $self->{h}); 3583 $tex->draw_quad_alpha (0, 0, $self->{w}, $self->{h});
3590 glDisable GL_TEXTURE_2D; 3584 glDisable GL_TEXTURE_2D;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines