#!/opt/bin/perl =head1 NAME gce - gtk (perl) crossfire editor =cut our $VERSION='0.1'; use Gtk2 -init; use Crossfire; use Crossfire::Tilecache; my $VARDIR = "$ENV{HOME}/.gcfedit"; mkdir $VARDIR; our $PICKDIR = "$Crossfire::LIB/maps/editor/picks"; Crossfire::init $VARDIR; Crossfire::Tilecache::init_tilecache "$VARDIR/tilecache"; use GCE::MainWindow; use GCE::PickWindow; my $w = GCE::MainWindow->new; $w->signal_connect (open_pick => sub { # XXX: How to give pick window the pickname ? my $p = GCE::PickWindow->new; $p->show_all; }); # XXX: signals don't feel right => move this stuff to MainWindow, it should # deal with all the stuff it does $w->signal_connect (update_stack_view => sub { my ($t, $x, $y, $a) = @_; print "$x $y: " . join (',', map { $_->{_name} } @$a) . "\n"; }); $w->show_all; Gtk2->main; =head1 AUTHOR Marc Lehmann http://home.schmorp.de/ Robin Redeker http://www.ta-sa.org/ =cut