ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/gde/gce
(Generate patch)

Comparing deliantra/gde/gce (file contents):
Revision 1.5 by elmex, Sun Feb 5 13:32:39 2006 UTC vs.
Revision 1.9 by elmex, Mon Feb 6 09:21:33 2006 UTC

6=cut 6=cut
7 7
8our $VERSION='0.1'; 8our $VERSION='0.1';
9 9
10use Gtk2 -init; 10use Gtk2 -init;
11
11use Crossfire; 12use Crossfire;
12use Crossfire::Gtk2; 13use Crossfire::Tilecache;
13
14my $pickdir = "$Crossfire::LIB/maps/editor/picks";
15 14
16my $VARDIR = "$ENV{HOME}/.gcfedit"; 15my $VARDIR = "$ENV{HOME}/.gcfedit";
17 16
18mkdir $VARDIR; 17mkdir $VARDIR;
19our $PICKDIR = "$Crossfire::LIB/maps/editor/picks"; 18our $PICKDIR = "$Crossfire::LIB/maps/editor/picks";
20 19
21Crossfire::init ($VARDIR); 20Crossfire::init $VARDIR;
22Crossfire::Gtk2::init_tilecache ("$VARDIR/tilecache"); 21Crossfire::Tilecache::init_tilecache "$VARDIR/tilecache";
23 22
24use GCE::MainWindow; 23use GCE::MainWindow;
25use GCE::PickWindow; 24use GCE::PickWindow;
26require GCE::Map;
27 25
28my $w = GCE::MainWindow->new; 26my $w = GCE::MainWindow->new;
29 27
30$w->signal_connect (open_pick => sub { 28$w->signal_connect (open_pick => sub {
31 # XXX: How to give pick window the pickname ? 29 # XXX: How to give pick window the pickname ?
32 my $p = GCE::PickWindow->new; 30 my $p = GCE::PickWindow->new;
33 $p->show_all; 31 $p->show_all;
32});
33
34# XXX: signals don't feel right => move this stuff to MainWindow, it should
35# deal with all the stuff it does
36$w->signal_connect (update_stack_view => sub {
37 my ($t, $x, $y, $a) = @_;
38 print "$x $y: " . join (',', map { $_->{_name} } @$a) . "\n";
34}); 39});
35 40
36$w->show_all; 41$w->show_all;
37 42
38Gtk2->main; 43Gtk2->main;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines