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.421 by root, Wed Aug 1 14:27:21 2007 UTC vs.
Revision 1.425 by root, Fri Aug 10 04:02:13 2007 UTC

1921sub realloc { 1921sub realloc {
1922 my ($self) = @_; 1922 my ($self) = @_;
1923 1923
1924 delete $self->{ox}; 1924 delete $self->{ox};
1925 $self->SUPER::realloc; 1925 $self->SUPER::realloc;
1926}
1927
1928sub clear {
1929 my ($self) = @_;
1930
1931 $self->set_text ("");
1926} 1932}
1927 1933
1928sub set_text { 1934sub set_text {
1929 my ($self, $text) = @_; 1935 my ($self, $text) = @_;
1930 1936
3583 3589
3584 if (my $anim = $::CONN->{anim}[$self->{anim}]) { 3590 if (my $anim = $::CONN->{anim}[$self->{anim}]) {
3585 if ($anim && @$anim) { 3591 if ($anim && @$anim) {
3586 delete $self->{wait_face}; 3592 delete $self->{wait_face};
3587 $self->{face} = $anim->[ $self->{frame} % @$anim ]; 3593 $self->{face} = $anim->[ $self->{frame} % @$anim ];
3588 $self->{tex} = $::CONN->{texture}[ $::CONN->{faceid}[$self->{face}] ]; 3594 if (my $tex = $self->{tex} = $::CONN->{texture}[ $::CONN->{faceid}[$self->{face}] ]) {
3595 unless ($tex->{name} || $tex->{loading}) {
3596 $tex->upload (sub { $self->reconfigure });
3597 }
3598 }
3589 } 3599 }
3590 } 3600 }
3591} 3601}
3592 3602
3593sub size_request { 3603sub size_request {
3594 my ($self) = @_; 3604 my ($self) = @_;
3595 3605
3596 if ($::CONN) { 3606 if ($::CONN) {
3597 if (my $faceid = $::CONN->{faceid}[$self->{face}]) { 3607 if (my $faceid = $::CONN->{faceid}[$self->{face}]) {
3598 if (my $tex = $::CONN->{texture}[$faceid]) { 3608 if (my $tex = $self->{tex} = $::CONN->{texture}[$faceid]) {
3599 $self->{tex} = $tex; 3609 if ($tex->{name}) {
3600 return ($self->{size_w} || $tex->{w}, $self->{size_h} || $tex->{h}); 3610 return ($self->{size_w} || $tex->{w}, $self->{size_h} || $tex->{h});
3611 } elsif (!$tex->{loading}) {
3612 $tex->upload (sub { $self->reconfigure });
3613 }
3601 } else { 3614 } else {
3602 $self->{wait_face} ||= $::CONN->connect_face_update ($faceid, sub { 3615 $self->{wait_face} ||= $::CONN->connect_face_update ($faceid, sub {
3603 $self->realloc; 3616 $self->reconfigure;
3604 }); 3617 });
3605 } 3618 }
3606 } 3619 }
3607 } 3620 }
3608 3621
4193} 4206}
4194 4207
4195sub update { 4208sub update {
4196 my ($self) = @_; 4209 my ($self) = @_;
4197 4210
4198 $::WANT_REFRESH++; 4211 $::WANT_REFRESH->start;
4199} 4212}
4200 4213
4201sub add { 4214sub add {
4202 my ($self, @children) = @_; 4215 my ($self, @children) = @_;
4203 4216

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines