1 | #!/opt/bin/perl |
1 | #!/opt/bin/perl |
2 | |
2 | |
3 | my $startup_done = sub { }; |
3 | my $startup_done = sub { }; |
|
|
4 | our $PANGO = "1.5.0"; |
4 | |
5 | |
5 | # do splash-screen thingy on win32 |
6 | # do splash-screen thingy on win32 |
6 | BEGIN { |
7 | BEGIN { |
7 | if (%PAR::LibCache && $^O eq "MSWin32") { |
8 | if (%PAR::LibCache && $^O eq "MSWin32") { |
8 | while (my ($filename, $zip) = each %PAR::LibCache) { |
9 | while (my ($filename, $zip) = each %PAR::LibCache) { |
… | |
… | |
43 | |
44 | |
44 | if ($^O eq "MSWin32") { |
45 | if ($^O eq "MSWin32") { |
45 | # relocatable |
46 | # relocatable |
46 | } else { |
47 | } else { |
47 | # unix, need to patch pango rc file |
48 | # unix, need to patch pango rc file |
48 | open my $fh, "<:perlio", "$tmp/usr/lib/pango/1.5.0/module-files.d/libpango1.0-0.modules" |
49 | open my $fh, "<:perlio", "$tmp/usr/lib/pango/$PANGO/module-files.d/libpango1.0-0.modules" |
49 | or die "$tmp/usr/lib/1.5.0/module-files.d/libpango1.0-0.modules: $!"; |
50 | or die "$tmp/usr/lib/$PANGO/module-files.d/libpango1.0-0.modules: $!"; |
50 | local $/; |
51 | local $/; |
51 | my $rc = <$fh>; |
52 | my $rc = <$fh>; |
52 | $rc =~ s/^\//$tmp\//gm; # replace abs paths by relative ones |
53 | $rc =~ s/^\//$tmp\//gm; # replace abs paths by relative ones |
53 | |
54 | |
54 | mkdir "$tmp/pango-modules"; |
55 | mkdir "$tmp/pango-modules"; |
… | |
… | |
495 | $LOGIN_BUTTON->set_text ("Login"); |
496 | $LOGIN_BUTTON->set_text ("Login"); |
496 | $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); |
497 | $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); |
497 | $SETUP_DIALOG->show; |
498 | $SETUP_DIALOG->show; |
498 | $PL_WINDOW->hide; |
499 | $PL_WINDOW->hide; |
499 | $SPELL_LIST->clear_spells; |
500 | $SPELL_LIST->clear_spells; |
|
|
501 | $CFPlus::UI::ROOT->emit (stop_game => ! ! $CONN); |
500 | |
502 | |
501 | return unless $CONN; |
503 | return unless $CONN; |
502 | |
504 | |
503 | status "connection closed"; |
505 | status "connection closed"; |
504 | |
506 | |
… | |
… | |
745 | $table->add (1, 1, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 2; 0 }); |
747 | $table->add (1, 1, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 2; 0 }); |
746 | $table->add (0, 2, new CFPlus::UI::Label text => "Show FPS"); |
748 | $table->add (0, 2, new CFPlus::UI::Label text => "Show FPS"); |
747 | $table->add (1, 2, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 4; 0 }); |
749 | $table->add (1, 2, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 4; 0 }); |
748 | $table->add (0, 3, new CFPlus::UI::Label text => "Suppress Tooltips"); |
750 | $table->add (0, 3, new CFPlus::UI::Label text => "Suppress Tooltips"); |
749 | $table->add (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 }); |
751 | $table->add (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 }); |
750 | $table->add (0, 4, new CFPlus::UI::Button text => "die on click(tm)", on_activate => sub { die "violator" } ); |
752 | $table->add (0, 4, new CFPlus::UI::Button text => "die on click(tm)", on_activate => sub { &CFPlus::debug() } ); |
751 | |
753 | |
752 | my @default_smooth = (0.05, 0.13, 0.05, 0.13, 0.30, 0.13, 0.05, 0.13, 0.05); |
754 | my @default_smooth = (0.05, 0.13, 0.05, 0.13, 0.30, 0.13, 0.05, 0.13, 0.05); |
753 | |
755 | |
754 | for my $x (0..2) { |
756 | for my $x (0..2) { |
755 | for my $y (0 .. 2) { |
757 | for my $y (0 .. 2) { |
… | |
… | |
1453 | has_close_button => 1 |
1455 | has_close_button => 1 |
1454 | ; |
1456 | ; |
1455 | |
1457 | |
1456 | my $ntb = |
1458 | my $ntb = |
1457 | $PL_NOTEBOOK = |
1459 | $PL_NOTEBOOK = |
1458 | new CFPlus::UI::Notebook expand => 1, debug => 1; |
1460 | new CFPlus::UI::Notebook expand => 1; |
1459 | |
1461 | |
1460 | $ntb->add ( |
1462 | $ntb->add ( |
1461 | "Statistics (F2)" => $STATS_PAGE = stats_window, |
1463 | "Statistics (F2)" => $STATS_PAGE = stats_window, |
1462 | "Shows statistics, where all your Stats and Resistances are shown." |
1464 | "Shows statistics, where all your Stats and Resistances are shown." |
1463 | ); |
1465 | ); |