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.113 by root, Sat Apr 15 12:46:48 2006 UTC vs.
Revision 1.115 by root, Sat Apr 15 19:35:20 2006 UTC

704 704
705 $child->set_parent ($self); 705 $child->set_parent ($self);
706 $self->{children}[$y][$x] = $child; 706 $self->{children}[$y][$x] = $child;
707 707
708 $self->{w} = $self->{h} = -1; 708 $self->{w} = $self->{h} = -1;
709 $self->update;
710}
711
712# TODO: move to container class maybe? send childs a signal on removal?
713sub clear {
714 my ($self) = @_;
715
716 delete $self->{children};
709 $self->update; 717 $self->update;
710} 718}
711 719
712sub get_wh { 720sub get_wh {
713 my ($self) = @_; 721 my ($self) = @_;
1960 1968
1961 # TODO: use animation 1969 # TODO: use animation
1962 if ($self->{state} = !$self->{state}) { 1970 if ($self->{state} = !$self->{state}) {
1963 $CFClient::UI::ROOT->add ($self->{other}); 1971 $CFClient::UI::ROOT->add ($self->{other});
1964 $self->{other}->move ($self->coord2global (0, $self->{h})); 1972 $self->{other}->move ($self->coord2global (0, $self->{h}));
1973 $self->emit ("open");
1965 } else { 1974 } else {
1966 $CFClient::UI::ROOT->remove ($self->{other}); 1975 $CFClient::UI::ROOT->remove ($self->{other});
1976 $self->emit ("close");
1967 } 1977 }
1978
1979 $self->emit (changed => $self->{state});
1968} 1980}
1969 1981
1970############################################################################# 1982#############################################################################
1971 1983
1972package CFClient::UI::Root; 1984package CFClient::UI::Root;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines