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.54 by root, Sun Jun 11 20:05:55 2006 UTC vs.
Revision 1.57 by elmex, Tue Jun 13 11:01:04 2006 UTC

76 $y -= int 0.5 * $::MAP->h; 76 $y -= int 0.5 * $::MAP->h;
77 77
78 $x += 1; 78 $x += 1;
79 $y += 1; 79 $y += 1;
80 80
81 $::CONN->send (sprintf "lookat %d %d", $x, $y) 81 $::CONN->lookat ($x, $y)
82 if $::CONN; 82 if $::CONN;
83 83
84 } elsif ($ev->{button} == 2) { 84 } elsif ($ev->{button} == 2) {
85 my ($ox, $oy) = ($ev->{x}, $ev->{y}); 85 my ($ox, $oy) = ($ev->{x}, $ev->{y});
86 my ($bw, $bh) = ($::CFG->{map_shift_x}, $::CFG->{map_shift_y}); 86 my ($bw, $bh) = ($::CFG->{map_shift_x}, $::CFG->{map_shift_y});
463 463
464 $self->{entry} = new CFClient::UI::Entry 464 $self->{entry} = new CFClient::UI::Entry
465 on_changed => sub { 465 on_changed => sub {
466 $self->update_labels; 466 $self->update_labels;
467 }, 467 },
468 on_button_down => sub {
469 my ($entry, $ev, $x, $y) = @_;
470
471 if ($ev->{button} == 3) {
472 (new CFClient::UI::Menu
473 items => [
474 ["bind to a key" => sub { $::BIND_EDITOR->do_quick_binding ([$self->{select}], sub { $entry->focus_in }) }]
475 ],
476 )->popup ($ev);
477 return 1;
478 }
479 0
480 },
468 on_key_down => sub { 481 on_key_down => sub {
469 my ($entry, $ev) = @_; 482 my ($entry, $ev) = @_;
470 483
471 my $self = $entry->{parent}{parent}; 484 my $self = $entry->{parent}{parent};
472 485

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines