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.295 by root, Tue Jun 6 09:19:28 2006 UTC vs.
Revision 1.296 by root, Wed Jun 7 05:48:53 2006 UTC

315} 315}
316 316
317sub move_abs { 317sub move_abs {
318 my ($self, $x, $y, $z) = @_; 318 my ($self, $x, $y, $z) = @_;
319 319
320 $self->{x} = List::Util::max 0, int $x; 320 $self->{x} = List::Util::max 0, List::Util::min $self->{root}{w} - $self->{w}, int $x;
321 $self->{y} = List::Util::max 0, int $y; 321 $self->{y} = List::Util::max 0, List::Util::min $self->{root}{h} - $self->{h}, int $y;
322 $self->{z} = $z if defined $z; 322 $self->{z} = $z if defined $z;
323 323
324 $self->update; 324 $self->update;
325} 325}
326 326
2789 or return; 2789 or return;
2790 2790
2791 my ($x, $y) = $widget->coord2global ($widget->{w}, 0); 2791 my ($x, $y) = $widget->coord2global ($widget->{w}, 0);
2792 2792
2793 ($x, $y) = $widget->coord2global (-$self->{w}, 0) 2793 ($x, $y) = $widget->coord2global (-$self->{w}, 0)
2794 if $x + $self->{w} > $::WIDTH; 2794 if $x + $self->{w} > $self->{root}{w};
2795 2795
2796 $self->move_abs ($x, $y); 2796 $self->move_abs ($x, $y);
2797 }); 2797 });
2798} 2798}
2799 2799

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines