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.240 by root, Fri May 26 18:28:23 2006 UTC vs.
Revision 1.241 by root, Fri May 26 20:50:35 2006 UTC

229sub set_invisible { 229sub set_invisible {
230 my ($self) = @_; 230 my ($self) = @_;
231 231
232 # broken show/hide model 232 # broken show/hide model
233 233
234 delete $self->{root};
234 delete $self->{visible}; 235 delete $self->{visible};
235 236
236 undef $GRAB if $GRAB == $self; 237 undef $GRAB if $GRAB == $self;
237 undef $HOVER if $HOVER == $self; 238 undef $HOVER if $HOVER == $self;
238 239
460 my ($self, $parent) = @_; 461 my ($self, $parent) = @_;
461 462
462 Scalar::Util::weaken ($self->{parent} = $parent); 463 Scalar::Util::weaken ($self->{parent} = $parent);
463 464
464 $self->{root} = $parent->{root}; 465 $self->{root} = $parent->{root};
465 $self->{visible} = $parent->{visible}; 466 $self->{visible} = $parent->{visible} + 1;
466 467
467 # TODO: req_w _does_change after ->reconfigure 468 # TODO: req_w _does_change after ->reconfigure
468 $self->check_size 469 $self->check_size
469 unless exists $self->{req_w}; 470 unless exists $self->{req_w};
470 471
2964 2965
2965sub new { 2966sub new {
2966 my $class = shift; 2967 my $class = shift;
2967 2968
2968 $class->SUPER::new ( 2969 $class->SUPER::new (
2970 visible => 1,
2969 @_, 2971 @_,
2970 ) 2972 )
2971} 2973}
2972 2974
2973sub configure { 2975sub configure {
3031sub add { 3033sub add {
3032 my ($self, @children) = @_; 3034 my ($self, @children) = @_;
3033 3035
3034 for (my @widgets = @children; my $w = pop @widgets; ) { 3036 for (my @widgets = @children; my $w = pop @widgets; ) {
3035 push @widgets, $w->children; 3037 push @widgets, $w->children;
3036 $w->{root} = $self; 3038 $w->{root} = $self;
3037 $w->{visible} = 1; 3039 $w->{visible} = $self->{visible} + 1;
3038 } 3040 }
3039 3041
3040 for my $child (@children) { 3042 for my $child (@children) {
3041 $child->{is_toplevel} = 1; 3043 $child->{is_toplevel} = 1;
3042 3044

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines