… | |
… | |
29 | |
29 | |
30 | my $menu = Gtk2::Menu->new; |
30 | my $menu = Gtk2::Menu->new; |
31 | foreach my $cm ( |
31 | foreach my $cm ( |
32 | [ |
32 | [ |
33 | Follow => sub { |
33 | Follow => sub { |
34 | $::MAINWIN->{edit_collection}{followexit}->begin ($map, $x, $y, $self) |
34 | $::MAINWIN->{edit_collection}{followexit}->edit ($map, $x, $y, $self) |
35 | } |
35 | } |
36 | ] |
36 | ] |
37 | ) { |
37 | ) { |
38 | my $item = Gtk2::MenuItem->new ($cm->[0]); |
38 | my $item = Gtk2::MenuItem->new ($cm->[0]); |
39 | $menu->append ($item); |
39 | $menu->append ($item); |
… | |
… | |
312 | # XXX: is this okay? my ($x, $y) = $map->coord ($event->x, $event->y); |
312 | # XXX: is this okay? my ($x, $y) = $map->coord ($event->x, $event->y); |
313 | my ($x, $y) = $map->coord ($map->get_pointer); |
313 | my ($x, $y) = $map->coord ($map->get_pointer); |
314 | |
314 | |
315 | my $ea = $self->ea; |
315 | my $ea = $self->ea; |
316 | |
316 | |
317 | $ea->begin ($map, $x, $y, $self) |
317 | $ea->begin ($map, $x, $y, $self); |
|
|
318 | |
|
|
319 | $ea->edit ($map, $x, $y, $self) |
318 | if $x >= 0 and $y >= 0 and $x < $map->{map}{width} and $y < $map->{map}{height}; |
320 | if $x >= 0 and $y >= 0 and $x < $map->{map}{width} and $y < $map->{map}{height}; |
319 | |
321 | |
320 | $self->{draw_mode} = [$x, $y]; |
322 | $self->{draw_mode} = [$x, $y]; |
321 | } |
323 | } |
322 | |
324 | |