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.385 by root, Fri Jul 20 16:32:17 2007 UTC vs.
Revision 1.387 by root, Fri Jul 20 18:19:45 2007 UTC

547 547
548 # parent 548 # parent
549 $self->{parent} && $self->{parent}->emit ($signal, @args) 549 $self->{parent} && $self->{parent}->emit ($signal, @args)
550} 550}
551 551
552sub find_widget { 552#sub find_widget {
553 my ($self, $x, $y) = @_; 553# in .xs
554
555 return () unless $self->{can_events};
556
557 return $self
558 if $x >= $self->{x} && $x < $self->{x} + $self->{w}
559 && $y >= $self->{y} && $y < $self->{y} + $self->{h};
560
561 ()
562}
563 554
564sub set_parent { 555sub set_parent {
565 my ($self, $parent) = @_; 556 my ($self, $parent) = @_;
566 557
567 CFPlus::weaken ($self->{parent} = $parent); 558 CFPlus::weaken ($self->{parent} = $parent);
1020 my ($self, $x, $y) = @_; 1011 my ($self, $x, $y) = @_;
1021 1012
1022 if ( $x >= $self->{x} && $x < $self->{x} + $self->{w} 1013 if ( $x >= $self->{x} && $x < $self->{x} + $self->{w}
1023 && $y >= $self->{y} && $y < $self->{y} + $self->{h} 1014 && $y >= $self->{y} && $y < $self->{y} + $self->{h}
1024 ) { 1015 ) {
1025 $self->child->find_widget ($x + $self->{view_x}, $y + $self->{view_y}) 1016 $self->child->find_widget ($x + $self->{view_x}, $y + $self->{view_y})
1026 } else { 1017 } else {
1027 $self->CFPlus::UI::Base::find_widget ($x, $y) 1018 $self->CFPlus::UI::Base::find_widget ($x, $y)
1028 } 1019 }
1029} 1020}
1030 1021
1135} 1126}
1136 1127
1137sub update { 1128sub update {
1138 my ($self) = @_; 1129 my ($self) = @_;
1139 1130
1131 $self->update_slider;
1140 $self->SUPER::update; 1132 $self->SUPER::update;
1141 $self->update_slider;
1142} 1133}
1143 1134
1144sub invoke_mouse_wheel { 1135sub invoke_mouse_wheel {
1145 my ($self, $ev) = @_; 1136 my ($self, $ev) = @_;
1146 1137

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines