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.445 by root, Sat Dec 8 19:17:02 2007 UTC vs.
Revision 1.446 by root, Sun Dec 16 00:21:58 2007 UTC

448 448
449# translate global coordinates to local coordinate system 449# translate global coordinates to local coordinate system
450sub coord2local { 450sub coord2local {
451 my ($self, $x, $y) = @_; 451 my ($self, $x, $y) = @_;
452 452
453 Carp::confess unless $self->{parent};#d# 453 return (undef, undef) unless $self->{parent};
454 454
455 $self->{parent}->coord2local ($x - $self->{x}, $y - $self->{y}) 455 $self->{parent}->coord2local ($x - $self->{x}, $y - $self->{y})
456} 456}
457 457
458# translate local coordinates to global coordinate system 458# translate local coordinates to global coordinate system
459sub coord2global { 459sub coord2global {
460 my ($self, $x, $y) = @_; 460 my ($self, $x, $y) = @_;
461 461
462 Carp::confess unless $self->{parent};#d# 462 return (undef, undef) unless $self->{parent};
463 463
464 $self->{parent}->coord2global ($x + $self->{x}, $y + $self->{y}) 464 $self->{parent}->coord2global ($x + $self->{x}, $y + $self->{y})
465} 465}
466 466
467sub invoke_focus_in { 467sub invoke_focus_in {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines