… | |
… | |
737 | |
737 | |
738 | $self->{view_x} = int $x; |
738 | $self->{view_x} = int $x; |
739 | $self->{view_y} = int $y; |
739 | $self->{view_y} = int $y; |
740 | |
740 | |
741 | $self->update; |
741 | $self->update; |
|
|
742 | } |
|
|
743 | |
|
|
744 | # hmm, this does not work for topleft of $self... but we should not aks for that |
|
|
745 | sub _topleft { |
|
|
746 | my ($self, $x, $y) = @_; |
|
|
747 | |
|
|
748 | $self->SUPER::_topleft ($x - $self->{view_x}, $y - $self->{view_y}) |
|
|
749 | } |
|
|
750 | |
|
|
751 | sub find_widget { |
|
|
752 | my ($self, $x, $y) = @_; |
|
|
753 | |
|
|
754 | if ( $x >= $self->{x} && $x < $self->{x} + $self->{w} |
|
|
755 | && $y >= $self->{y} && $y < $self->{y} + $self->{h} |
|
|
756 | ) { |
|
|
757 | $self->child->find_widget ($x + $self->{view_x}, $y + $self->{view_y}) |
|
|
758 | } else { |
|
|
759 | $self->CFClient::UI::Base::find_widget ($x, $y) |
|
|
760 | } |
742 | } |
761 | } |
743 | |
762 | |
744 | sub _render { |
763 | sub _render { |
745 | my ($self) = @_; |
764 | my ($self) = @_; |
746 | |
765 | |