ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/MapWidget.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.65 by root, Sun Jun 18 17:39:36 2006 UTC vs.
Revision 1.66 by root, Sun Jun 18 19:13:20 2006 UTC

70 return unless $::CONN; 70 return unless $::CONN;
71 71
72 $self->grab_focus; 72 $self->grab_focus;
73 73
74 if ($ev->{button} == 1) { 74 if ($ev->{button} == 1) {
75 my $x = CFClient::floor +($ev->{x} - $self->{sx0}) / $self->{tilesize} - $self->{sx}; 75 my $x = 1 + CFClient::floor +($ev->{x} - $self->{sx0}) / $self->{tilesize} - $self->{sx};
76 my $y = CFClient::floor +($ev->{y} - $self->{sy0}) / $self->{tilesize} - $self->{sy}; 76 my $y = 1 + CFClient::floor +($ev->{y} - $self->{sy0}) / $self->{tilesize} - $self->{sy};
77 77
78 $x -= int 0.5 * $self->{sw}; 78 $x -= int 0.5 * $self->{sw};
79 $y -= int 0.5 * $self->{sh}; 79 $y -= int 0.5 * $self->{sh};
80 80
81 $::CONN->lookat ($x, $y) 81 $::CONN->lookat ($x, $y)
120 1 120 1
121} 121}
122 122
123sub size_request { 123sub size_request {
124 ( 124 (
125 1 + 32 * int $::WIDTH / 32, 125 32 * CFClient::ceil $::WIDTH / 32,
126 1 + 32 * int $::HEIGHT / 32, 126 32 * CFClient::ceil $::HEIGHT / 32,
127 ) 127 )
128} 128}
129 129
130sub update { 130sub update {
131 my ($self) = @_; 131 my ($self) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines