--- deliantra/Deliantra-Client/DC/UI.pm 2006/04/24 11:54:26 1.171 +++ deliantra/Deliantra-Client/DC/UI.pm 2006/04/25 09:52:04 1.172 @@ -238,6 +238,9 @@ # nothing to be done } +sub children { +} + sub set_max_size { my ($self, $w, $h) = @_; @@ -522,6 +525,10 @@ $child->check_size; } +sub children { + @{ $_[0]{children} } +} + sub remove { my ($self, $child) = @_; @@ -917,13 +924,18 @@ $child->check_size; } +sub children { + grep $_, map @$_, grep $_, @{ $_[0]{children} } +} + # TODO: move to container class maybe? send childs a signal on removal? sub clear { my ($self) = @_; - my $children = delete $self->{children}; + my @children = $self->children; + delete $self->{children}; - for (grep $_, map @$_, grep $_, @$children) { + for (@children) { delete $_->{parent}; $_->hide; } @@ -2156,6 +2168,7 @@ if ($self->{texture}) { glEnable GL_TEXTURE_2D; glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; + glColor 1, 1, 1, 1; $self->{texture}->draw_quad (0, 0, $self->{w}, $self->{h}); glDisable GL_TEXTURE_2D; }