ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/cf.schmorp.de/gde/GCE/MapEditor.pm
Revision: 1.42
Committed: Tue Aug 29 20:05:34 2006 UTC (20 years, 2 months ago) by elmex
Branch: MAIN
Changes since 1.41: +37 -2 lines
Log Message:
attachment editing for maps implemented. fixed the issue that map properties
are still open for already closed maps.

File Contents

# User Rev Content
1 elmex 1.1 package GCE::MapEditor;
2    
3     =head1 NAME
4    
5     GCE::MapEditor - the map editing widget
6    
7     =cut
8    
9     use Gtk2;
10     use Gtk2::Gdk::Keysyms;
11     use Gtk2::SimpleMenu;
12    
13     use Crossfire;
14 root 1.3 use Crossfire::Map;
15 elmex 1.1 use Crossfire::MapWidget;
16    
17     use GCE::AttrEdit;
18 elmex 1.22 use GCE::Util;
19 elmex 1.1
20 elmex 1.4 use Glib::Object::Subclass
21 elmex 1.6 Gtk2::Window;
22 elmex 1.1
23     use strict;
24    
25 elmex 1.35 sub do_context_menu {
26     my ($self, $map, $event) = @_;
27    
28     my ($x, $y) = $map->coord ($event->x, $event->y);
29    
30     my $menu = Gtk2::Menu->new;
31     foreach my $cm (
32     [
33     Follow => sub {
34 elmex 1.36 $::MAINWIN->{edit_collection}{followexit}->edit ($map, $x, $y, $self)
35 elmex 1.38 },
36 elmex 1.35 ]
37     ) {
38     my $item = Gtk2::MenuItem->new ($cm->[0]);
39     $menu->append ($item);
40     $item->show;
41     $item->signal_connect (activate => $cm->[1]);
42     }
43 elmex 1.38
44     my $inv_item = Gtk2::MenuItem->new ("Add inventory");
45     $inv_item->set_submenu (my $smenu = new Gtk2::Menu);
46     $menu->append ($inv_item);
47    
48     for my $sr (reverse $self->get_stack_refs ($map, $x, $y)) {
49     my $item = Gtk2::MenuItem->new ($sr->longname);
50     $smenu->append ($item);
51     $item->show;
52     $item->signal_connect (activate => sub {
53     $sr->add_inv ($::MAINWIN->get_pick);
54     });
55     }
56    
57     $inv_item->show;
58 elmex 1.35 $menu->popup (undef, undef, undef, undef, $event->button, $event->time);
59     }
60    
61 root 1.9 sub build_menu {
62     my ($self) = @_;
63    
64     my $menu_tree = [
65     _File => {
66     item_type => '<Branch>',
67     children => [
68     "_Save" => {
69 root 1.10 callback => sub { $self->save_map },
70 root 1.9 accelerator => '<ctrl>S'
71     },
72 root 1.10 "Save As" => {
73     callback => sub { $self->save_map_as },
74     },
75 elmex 1.42 "Map _Properties" => {
76 elmex 1.32 callback => sub { $self->open_map_prop },
77     accelerator => "<ctrl>P"
78     },
79 elmex 1.42 "Map _Attachments" => {
80     callback => sub { $self->open_attach_edit },
81     accelerator => "<ctrl>A"
82     },
83 elmex 1.32 "_Map Resize" => {
84     callback => sub { $self->open_resize_map },
85     },
86 root 1.13 "Close" => {
87 elmex 1.31 callback => sub { $self->destroy },
88 root 1.13 },
89 root 1.10 ]
90 root 1.9 },
91     _Edit => {
92     item_type => '<Branch>',
93     children => [
94     "_Undo" => {
95     callback => sub { $self->undo },
96 elmex 1.17 accelerator => "<ctrl>Z"
97 root 1.9 },
98     "_Redo" => {
99     callback => sub { $self->redo },
100 elmex 1.17 accelerator => "<ctrl>Y"
101     },
102 root 1.9 ]
103     },
104 elmex 1.27 _Go => {
105     item_type => '<Branch>',
106     children => [
107     "_Up" => {
108     callback => sub { $self->follow ('u') },
109 elmex 1.33 accelerator => "<ctrl>Up"
110 elmex 1.27 },
111     "_Down" => {
112     callback => sub { $self->follow ('d') },
113 elmex 1.33 accelerator => "<ctrl>Down"
114 elmex 1.27 },
115     "_Right" => {
116     callback => sub { $self->follow ('r') },
117 elmex 1.33 accelerator => "<ctrl>Right"
118 elmex 1.27 },
119     "_Left" => {
120     callback => sub { $self->follow ('l') },
121 elmex 1.33 accelerator => "<ctrl>Left"
122 elmex 1.27 },
123     ]
124     },
125 elmex 1.29 _Help => {
126     item_type => '<Branch>',
127     children => [
128 elmex 1.30 _Manual => {
129 elmex 1.29 callback => sub { $::MAINWIN->show_help_window },
130     accelerator => "<ctrl>H"
131     },
132     ]
133     },
134 root 1.9 ];
135    
136     my $men =
137     Gtk2::SimpleMenu->new (
138     menu_tree => $menu_tree,
139     default_callback => \&default_cb,
140     );
141    
142 elmex 1.23 for (
143     [i => 'pick'],
144     [p => 'place'],
145 elmex 1.24 [e => 'erase'],
146     [s => 'select'],
147     [l => 'eval'],
148 elmex 1.37 [t => 'connect'],
149 elmex 1.24 [f => 'followexit']
150 elmex 1.23 )
151     {
152 elmex 1.24 my $tool = $_->[1];
153 elmex 1.23 $men->{accel_group}->connect ($Gtk2::Gdk::Keysyms{$_->[0]}, [], 'visible',
154 elmex 1.24 sub { $::MAINWIN->set_edit_tool ($tool) });
155 elmex 1.23 }
156    
157 elmex 1.39 $men->{accel_group}->connect ($Gtk2::Gdk::Keysyms{'r'}, ['control-mask'], 'visible',
158     sub { $self->redo });
159    
160 root 1.9 $self->add_accel_group ($men->{accel_group});
161    
162     return $men->{widget};
163     }
164    
165 elmex 1.31 sub set_edit_tool {
166     my ($self, $tool) = @_;
167    
168     $self->{etool} = $tool;
169    
170     if ($self->ea->special_arrow) {
171     $self->{map}{window}->set_cursor (Gtk2::Gdk::Cursor->new ($self->ea->special_arrow));
172 elmex 1.34 } else {
173     # FIXME: Get the original cursor and insert it here
174     $self->{map}{window}->set_cursor (Gtk2::Gdk::Cursor->new ('GDK_LEFT_PTR'));
175 elmex 1.31 }
176     }
177    
178 elmex 1.19 sub ea {
179     my ($self) = @_;
180 elmex 1.31 $self->{ea_alt} || $self->{etool};
181 elmex 1.19 }
182    
183 elmex 1.1 sub INIT_INSTANCE {
184     my ($self) = @_;
185    
186 elmex 1.6 $self->set_title ('gce - map editor');
187     $self->add (my $vb = Gtk2::VBox->new);
188 elmex 1.1
189 root 1.9 $vb->pack_start (my $menu = $self->build_menu, 0, 1, 0);
190    
191     $vb->pack_start (my $map = $self->{map} = Crossfire::MapWidget->new, 1, 1, 0);
192    
193 elmex 1.31 $map->signal_connect_after (key_press_event => sub {
194 elmex 1.19 my ($map, $event) = @_;
195 root 1.9
196 elmex 1.19 my $kv = $event->keyval;
197 root 1.9
198 elmex 1.31 my $ret = 0;
199    
200 elmex 1.23 my ($x, $y) = $map->coord ($map->get_pointer);
201     for ([Control_L => sub { $self->{ea_alt} = $::MAINWIN->{edit_collection}{erase} }],
202     [Alt_L => sub { $self->{ea_alt} = $::MAINWIN->{edit_collection}{pick} }],
203     [c => sub { $::MAINWIN->{edit_collection}{select}->copy }],
204 elmex 1.28 [v => sub { $::MAINWIN->{edit_collection}{select}->paste ($map, $x, $y) }],
205 elmex 1.24 [n => sub { $::MAINWIN->{edit_collection}{select}->invoke }],
206 elmex 1.23 )
207     {
208 elmex 1.34 my $ed = $_;
209    
210     if ($kv == $Gtk2::Gdk::Keysyms{$ed->[0]}) {
211     my $was_in_draw = defined $self->{draw_mode};
212    
213     $self->stop_drawmode ($map)
214     if $was_in_draw && grep { $ed->[0] eq $_ } qw/Control_L Alt_L/;
215    
216     $ed->[1]->();
217 elmex 1.31 $ret = 1;
218 elmex 1.34
219     $self->start_drawmode ($map)
220     if $was_in_draw && grep { $ed->[0] eq $_ } qw/Control_L Alt_L/;
221 elmex 1.23 }
222 elmex 1.19 }
223 root 1.9
224 elmex 1.19 if ($self->ea->special_arrow) {
225     $map->{window}->set_cursor (Gtk2::Gdk::Cursor->new ($self->ea->special_arrow));
226 elmex 1.34 } else {
227     # FIXME: Get the original cursor and insert it here
228     $map->{window}->set_cursor (Gtk2::Gdk::Cursor->new ('GDK_LEFT_PTR'));
229 elmex 1.19 }
230 elmex 1.31
231     $ret
232 elmex 1.19 });
233 elmex 1.31
234     $map->signal_connect_after (key_release_event => sub {
235 elmex 1.19 my ($map, $event) = @_;
236    
237 elmex 1.31 my $ret = 0;
238    
239 elmex 1.19 if ($event->keyval == $Gtk2::Gdk::Keysyms{Control_L}
240     or $event->keyval == $Gtk2::Gdk::Keysyms{Alt_L})
241     {
242 elmex 1.34 my $was_in_draw = defined $self->{draw_mode};
243    
244     $self->stop_drawmode ($map)
245     if $was_in_draw;
246    
247 elmex 1.19 delete $self->{ea_alt};
248 elmex 1.31 $ret = 1;
249 elmex 1.34
250     $self->start_drawmode ($map)
251     if $was_in_draw;
252 elmex 1.19 }
253    
254     if ($self->ea->special_arrow) {
255     $map->{window}->set_cursor (Gtk2::Gdk::Cursor->new ($self->ea->special_arrow));
256     } else {
257 elmex 1.31 # FIXME: Get the original cursor and insert it here
258 elmex 1.19 $map->{window}->set_cursor (Gtk2::Gdk::Cursor->new ('GDK_LEFT_PTR'));
259     }
260 elmex 1.31
261     $ret
262 elmex 1.19 });
263 elmex 1.31 $map->signal_connect_after (button_press_event => sub {
264 elmex 1.19 my ($map, $event) = @_;
265 elmex 1.1
266 elmex 1.31 if ((not $self->{draw_mode}) and $event->button == 1) {
267 elmex 1.19 my $ea = $self->ea;
268 elmex 1.4
269 elmex 1.34 $self->start_drawmode ($map);
270 root 1.9
271 elmex 1.19 $ea->want_cursor
272     or $map->disable_tooltip;
273 root 1.9
274 elmex 1.19 return 1;
275 elmex 1.35 } elsif ($event->button == 3) {
276     $self->do_context_menu ($map, $event);
277     return 1;
278 elmex 1.19 }
279 elmex 1.31
280 elmex 1.19 0
281 root 1.9 });
282    
283     $map->signal_connect_after (motion_notify_event => sub {
284     my ($map, $event) = @_;
285    
286     $self->{draw_mode}
287     or return;
288    
289 elmex 1.19 my $ea = $self->ea;
290    
291     my ($X, $Y) = @{$self->{draw_mode}}[0,1];
292 root 1.9 my ($x, $y) = $map->coord ($map->get_pointer);
293 elmex 1.4
294 root 1.9 while ($x != $X || $y != $Y) {
295 elmex 1.4
296 root 1.9 $X++ if $X < $x;
297     $X-- if $X > $x;
298     $Y++ if $Y < $y;
299     $Y-- if $Y > $y;
300 elmex 1.4
301 elmex 1.39 unless ($ea->only_on_click) {
302     $ea->edit ($map, $X, $Y, $self)
303     if $X >= 0 and $Y >= 0 and $X < $map->{map}{width} and $Y < $map->{map}{height};
304     }
305 root 1.9 }
306 elmex 1.4
307 elmex 1.19 @{$self->{draw_mode}}[0,1] = ($X, $Y);
308 elmex 1.1
309 root 1.9 1
310     });
311 elmex 1.1
312 elmex 1.31 $map->signal_connect_after (button_release_event => sub {
313 root 1.9 my ($map, $event) = @_;
314 elmex 1.1
315 elmex 1.31 if ($self->{draw_mode} and $event->button == 1) {
316 elmex 1.19 my $ea = $self->ea;
317 elmex 1.1
318 elmex 1.34 $self->stop_drawmode ($map);
319 elmex 1.4
320 root 1.9 $ea->want_cursor
321     or $map->enable_tooltip;
322 elmex 1.1
323 root 1.9 return 1;
324     }
325 elmex 1.1
326 root 1.9 0
327     });
328     }
329 elmex 1.8
330 elmex 1.34 sub start_drawmode {
331     my ($self, $map) = @_;
332    
333     $self->{draw_mode} and return;
334    
335     # XXX: is this okay? my ($x, $y) = $map->coord ($event->x, $event->y);
336     my ($x, $y) = $map->coord ($map->get_pointer);
337    
338     my $ea = $self->ea;
339    
340 elmex 1.36 $ea->begin ($map, $x, $y, $self);
341    
342     $ea->edit ($map, $x, $y, $self)
343 elmex 1.34 if $x >= 0 and $y >= 0 and $x < $map->{map}{width} and $y < $map->{map}{height};
344    
345     $self->{draw_mode} = [$x, $y];
346     }
347    
348     sub stop_drawmode {
349     my ($self, $map) = @_;
350    
351     $self->{draw_mode} or return;
352    
353     my ($x, $y) = $map->coord ($map->get_pointer);
354    
355     my $ea = $self->ea;
356     $ea->end ($map, $x, $y, $self);
357    
358     delete $self->{draw_mode};
359     }
360    
361 elmex 1.16 # FIXME: Fix the automatic update of the attribute editor! and also the stack view!
362 root 1.9 sub undo {
363     my ($self) = @_;
364 elmex 1.8
365 root 1.9 my $map = $self->{map}; # the Crossfire::MapWidget
366 elmex 1.1
367 root 1.9 $map->{undo_stack_pos}
368     or return;
369 elmex 1.1
370 root 1.9 $map->change_swap ($map->{undo_stack}[--$map->{undo_stack_pos}]);
371     }
372 elmex 1.1
373 elmex 1.38 sub get_stack_refs {
374     my ($self, $map, $x, $y) = @_;
375    
376     my $cstack = $map->get ($x, $y);
377    
378     return [] unless @$cstack;
379    
380     my @refs;
381    
382     for my $arch (@$cstack) {
383     my ($ox, $oy) = ($x, $y);
384     if ($arch->{_virtual}) {
385     $ox = $arch->{virtual_x};
386     $oy = $arch->{virtual_y};
387     $arch = $arch->{_virtual};
388     $cstack = $map->get ($ox, $oy);
389     # XXX: This heavily blows up if $arch isn't on $cstack now.. and it actually really does :(
390     }
391    
392     push @refs,
393     GCE::ArchRef->new (
394     arch => $arch,
395     cb => sub {
396     $map->change_begin ('attredit');
397     $map->change_stack ($ox, $oy, $cstack);
398    
399     if (my $changeset = $map->change_end) {
400     splice @{ $map->{undo_stack} ||= [] },
401     $map->{undo_stack_pos}++, 1e6,
402     $changeset;
403     }
404     }
405     );
406     }
407    
408     return @refs;
409     }
410    
411 root 1.9 sub redo {
412     my ($self) = @_;
413 elmex 1.7
414 root 1.9 my $map = $self->{map}; # the Crossfire::MapWidget
415 elmex 1.7
416 elmex 1.14 $map->{undo_stack}
417     and $map->{undo_stack_pos} < @{$map->{undo_stack}}
418     or return;
419 elmex 1.1
420 root 1.9 $map->change_swap ($map->{undo_stack}[$map->{undo_stack_pos}++]);
421 root 1.3 }
422    
423     sub open_map {
424 elmex 1.26 my ($self, $path, $key) = @_;
425    
426     $self->{mapkey} = $key;
427 root 1.3
428 elmex 1.18 if (ref $path) {
429     $self->{map}->set_map ($path);
430 elmex 1.39 $self->set_title ('<ram>');
431 elmex 1.18
432     } else {
433     $self->{path} = $path;
434 elmex 1.17 # print "OPENMAP $path\n";
435 elmex 1.18 $self->{map}->set_map (my $m = new_from_file Crossfire::Map $path);
436 elmex 1.39 $self->set_title ("gce - map editor - $self->{path}");
437 elmex 1.18 require Data::Dumper;
438     # print "FOO:" .Data::Dumper::Dumper ($m) . "\n";
439     }
440 root 1.3 }
441    
442 root 1.13 sub save_map {
443     my ($self) = @_;
444    
445 elmex 1.19 if ($self->{path}) {
446     $self->{map}{map}->write_file ($self->{path});
447 elmex 1.22 quick_msg ($self, "saved to $self->{path}");
448 elmex 1.39 $self->set_title ("gce - map editor - $self->{path}");
449 elmex 1.22 } else {
450     $self->save_map_as;
451 elmex 1.19 }
452 root 1.13 }
453    
454     sub save_map_as {
455     my ($self) = @_;
456 elmex 1.19
457 elmex 1.22 my $fc = $::MAINWIN->new_filechooser ('gce - save map', 1, $self->{path});
458 elmex 1.19
459     if ('ok' eq $fc->run) {
460    
461     $::MAINWIN->{fc_last_folder} = $fc->get_current_folder;
462     $::MAINWIN->{fc_last_folders}->{$self->{fc_last_folder}}++;
463    
464     $self->{map}{map}->write_file ($self->{path} = $fc->get_filename);
465 elmex 1.22 quick_msg ($self, "saved to $self->{path}");
466 elmex 1.39 $self->set_title ("gce - map editor - $self->{path}");
467 elmex 1.19 }
468    
469     $fc->destroy;
470 root 1.13 }
471    
472 elmex 1.17 sub _add_prop_entry {
473     my ($self, $table, $idx, $key, $desc, $type, $changecb) = @_;
474    
475     my $edwid;
476    
477     if ($type eq 'string') {
478     $table->attach_defaults (my $lbl = Gtk2::Label->new ($desc), 0, 1, $idx, $idx + 1);
479     $edwid = Gtk2::Entry->new;
480     $edwid->set_text ($self->{map}{map}{info}{$key});
481     $edwid->signal_connect (changed => sub {
482     $self->{map}{map}{info}{$key} = $_[0]->get_text;
483     if ($changecb) {
484     $changecb->($_[0]->get_text);
485     }
486     });
487     $table->attach_defaults ($edwid, 1, 2, $idx, $idx + 1);
488    
489     } elsif ($type eq 'button') {
490     $table->attach_defaults (my $b = Gtk2::Button->new_with_label ($desc), 0, 2, $idx, $idx + 1);
491     $b->signal_connect (clicked => ($changecb || sub {}));
492    
493     } elsif ($type eq 'label') {
494     $table->attach_defaults (my $lbl = Gtk2::Label->new ($desc), 0, 1, $idx, $idx + 1);
495     $edwid = Gtk2::Label->new ($self->{map}{map}{info}{$key});
496     $table->attach_defaults ($edwid, 1, 2, $idx, $idx + 1);
497    
498 elmex 1.27 } elsif ($type eq 'check') {
499     $table->attach_defaults (my $lbl1 = Gtk2::Label->new ($desc), 0, 1, $idx, $idx + 1);
500     $table->attach_defaults (my $lbl = Gtk2::CheckButton->new, 1, 2, $idx, $idx + 1);
501     $lbl->set_active ($self->{map}{map}{info}{$key});
502     $lbl->signal_connect (toggled => sub {
503     my ($lbl) = @_;
504     $self->{map}{map}{info}{$key} = $lbl->get_active * 1;
505     ($changecb || sub {})->($lbl->get_active);
506     });
507    
508     } elsif ($type eq 'sep') {
509     $table->attach_defaults (my $lbl1 = Gtk2::HSeparator->new, 0, 2, $idx, $idx + 1);
510 elmex 1.17 } else {
511     $edwid = Gtk2::Label->new ("FOO");
512     }
513     }
514    
515     sub open_resize_map {
516     my ($self) = @_;
517    
518     my $w = Gtk2::Window->new ('toplevel');
519     $w->set_default_size (250, 150);
520     $w->add (my $sw = Gtk2::ScrolledWindow->new);
521     $sw->add_with_viewport (my $v = Gtk2::VBox->new);
522     $sw->set_policy ('automatic', 'automatic');
523     $v->pack_start (my $t = Gtk2::Table->new (2, 10), 0, 0, 0);
524    
525     my $i = 0;
526     for (
527     [qw/width Width string/],
528     [qw/height Height string/],
529     [qw/save Save button/,
530     sub {
531     $self->{map}{map}->resize ($self->{map}{map}{info}{width}, $self->{map}{map}{info}{height});
532 elmex 1.19 $self->{map}->invalidate_all;
533     $w->destroy;
534 elmex 1.17 }
535     ],
536     )
537     {
538     $self->_add_prop_entry ($t, $i++, @$_);
539     }
540    
541     $w->show_all;
542     }
543    
544 elmex 1.27 sub follow {
545     my ($self, $dir) = @_;
546    
547     my %dir_to_path = (
548     u => 'tile_path_1',
549     d => 'tile_path_3',
550     r => 'tile_path_2',
551     l => 'tile_path_4',
552     );
553    
554     defined $dir_to_path{$dir}
555     or return;
556     my $map = $self->{map}{map}{info}{$dir_to_path{$dir}}
557     or return;
558    
559     $map = map2abs ($map, $self);
560     $::MAINWIN->open_map_editor ($map);
561     }
562    
563 elmex 1.42 sub open_attach_edit {
564     my ($self) = @_;
565    
566     my $w = GCE::AttachEditor->new;
567     $w->set_attachment (
568     $self->{map}{map}{info}{attach},
569     sub {
570     if (@{$_[0]}) {
571     $self->{map}{map}{info}{attach} = $_[0]
572     } else {
573     delete $self->{map}{map}{info}{attach};
574     }
575     }
576     );
577     $self->{attach_editor} = $w;
578     $w->signal_connect (destroy => sub { delete $self->{attach_editor} });
579     $w->show_all;
580     }
581    
582     sub close_windows {
583     my ($self) = @_;
584    
585     $self->{attach_editor}->destroy
586     if $self->{attach_editor};
587     $self->{map_properties}->destroy
588     if $self->{map_properties};
589     }
590    
591 elmex 1.17 sub open_map_prop {
592     my ($self) = @_;
593    
594 elmex 1.42 return if $self->{map_properties};
595    
596     my $w = $self->{map_properties} = Gtk2::Window->new ('toplevel');
597     $w->signal_connect (destroy => sub { delete $self->{map_properties} });
598 elmex 1.17
599     $w->set_default_size (500, 500);
600     $w->add (my $sw = Gtk2::ScrolledWindow->new);
601     $sw->add_with_viewport (my $v = Gtk2::VBox->new);
602     $sw->set_policy ('automatic', 'automatic');
603     $v->pack_start (my $t = Gtk2::Table->new (2, 10), 0, 0, 0);
604    
605     my $i = 0;
606     for (
607 elmex 1.27 [qw/name Name string/],
608     [qw/region Region string/],
609     [qw/enter_x Enter-x string/],
610     [qw/enter_y Enter-y string/],
611     [qw/reset_timeout Reset-timeout string/],
612     [qw/swap_time Swap-timeout string/],
613     [qw/x x sep/],
614     [qw/difficulty Difficulty string/],
615     [qw/windspeed Windspeed string/],
616     [qw/pressure Pressure string/],
617     [qw/humid Humid string/],
618     [qw/temp Temp string/],
619     [qw/darkness Darkness string/],
620     [qw/sky Sky string/],
621     [qw/winddir Winddir string/],
622     [qw/x x sep/],
623     [qw/width Width label/], # sub { $self->{map}{map}->resize ($_[0], $self->{map}{map}{height}) }],
624     [qw/height Height label/], # sub { $self->{map}{map}->resize ($self->{map}{map}{width}, $_[0]) }],
625     [qw/x x sep/],
626     [qw/msg Text text/],
627     [qw/maplore Maplore text/],
628     [qw/outdoor Outdoor check/],
629     [qw/unique Unique check/],
630     [qw/fixed_resettime Fixed-resettime check/],
631     [qw/x x sep/],
632     [qw/tile_path_1 Northpath string/],
633     [qw/tile_path_2 Eastpath string/],
634     [qw/tile_path_3 Southpath string/],
635     [qw/tile_path_4 Westpath string/],
636     [qw/tile_path_5 Toppath string/],
637     [qw/tile_path_6 Bottompath string/],
638 elmex 1.39 [qw/x x sep/],
639     ['x', 'For shop description look in the manual', 'button', sub { $::MAINWIN->show_help_window }],
640     [qw/shopmin Shopmin string/],
641     [qw/shopmax Shopmax string/],
642     [qw/shoprace Shoprace string/],
643     [qw/shopgreed Shopgreed string/],
644     [qw/shopitems Shopitems string/],
645 elmex 1.17 )
646     {
647     $self->_add_prop_entry ($t, $i++, @$_);
648     }
649    
650     $w->show_all;
651     }
652    
653 elmex 1.1 =head1 AUTHOR
654    
655     Marc Lehmann <schmorp@schmorp.de>
656     http://home.schmorp.de/
657    
658     Robin Redeker <elmex@ta-sa.org>
659     http://www.ta-sa.org/
660    
661     =cut
662     1;
663