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.183 by elmex, Sun Apr 30 13:10:46 2006 UTC vs.
Revision 1.184 by root, Wed May 3 19:56:05 2006 UTC

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
745sub _topleft {
746 my ($self, $x, $y) = @_;
747
748 $self->SUPER::_topleft ($x - $self->{view_x}, $y - $self->{view_y})
749}
750
751sub 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
744sub _render { 763sub _render {
745 my ($self) = @_; 764 my ($self) = @_;
746 765

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines