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.187 by root, Mon May 8 20:40:31 2006 UTC vs.
Revision 1.188 by root, Mon May 8 21:16:09 2006 UTC

530 530
531 $self 531 $self
532} 532}
533 533
534sub add { 534sub add {
535 my ($self, $child) = @_; 535 my ($self, @widgets) = @_;
536 536
537 $child->set_parent ($self); 537 $_->set_parent ($self)
538 for @widgets;
538 539
539 use sort 'stable'; 540 use sort 'stable';
540 541
541 $self->{children} = [ 542 $self->{children} = [
542 sort { $a->{z} <=> $b->{z} } 543 sort { $a->{z} <=> $b->{z} }
543 @{$self->{children}}, $child 544 @{$self->{children}}, @widgets
544 ]; 545 ];
545 546
546 $child->check_size; 547 $_->check_size
548 for @widgets;
549
547 $self->update; 550 $self->update;
548} 551}
549 552
550sub children { 553sub children {
551 @{ $_[0]{children} } 554 @{ $_[0]{children} }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines