ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/gde/GCE/PickWindow.pm
(Generate patch)

Comparing deliantra/gde/GCE/PickWindow.pm (file contents):
Revision 1.18 by elmex, Sun Apr 2 10:58:52 2006 UTC vs.
Revision 1.19 by elmex, Tue Apr 4 11:29:54 2006 UTC

67 $map->set_size_request (TILESIZE * 10, TILESIZE * 10); 67 $map->set_size_request (TILESIZE * 10, TILESIZE * 10);
68 68
69 $map->signal_connect (button_press_event => sub { 69 $map->signal_connect (button_press_event => sub {
70 my ($map, $event) = @_; 70 my ($map, $event) = @_;
71 71
72 if ($event->button == 3) { 72 if ($event->button == 1) {
73
74 my ($mx, $my) = $map->coord ($event->x, $event->y);
75 my $as = $map->get ($mx, $my);
76
77 my $arch = $as->[-1]
78 or return;
79
80 $::MAINWIN->set_pick ($arch);
81 $::MAINWIN->set_edit_tool ('place');
82
83 } elsif ($event->button == 1) {
84 73
85 my ($mx, $my) = $map->coord ($event->x, $event->y); 74 my ($mx, $my) = $map->coord ($event->x, $event->y);
86 my $as = $map->get ($mx, $my); 75 my $as = $map->get ($mx, $my);
87 76
88 my $arch = $as->[-1] 77 my $arch = $as->[-1]
91 if ($arch->{_virtual}) { 80 if ($arch->{_virtual}) {
92 $arch = $arch->{_virtual}; 81 $arch = $arch->{_virtual};
93 } 82 }
94 83
95 $self->{last_pick} = $arch; 84 $self->{last_pick} = $arch;
96 $::MAINWIN->set_pick ($arch);
97 $::MAINWIN->update_attr_editor ($arch); 85 $::MAINWIN->update_attr_editor ($arch);
98 $::MAINWIN->set_edit_tool ('place'); 86 $::MAINWIN->set_edit_tool ('place');
99 } 87 }
100 88
101#my $d = $map->disable_tooltip; 89#my $d = $map->disable_tooltip;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines