ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/cfplus
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.151 by root, Mon Apr 16 21:12:51 2007 UTC vs.
Revision 1.155 by root, Sat May 12 08:13:34 2007 UTC

29# do things only needed for single-binary version (par) 29# do things only needed for single-binary version (par)
30BEGIN { 30BEGIN {
31 if (%PAR::LibCache) { 31 if (%PAR::LibCache) {
32 @INC = grep ref, @INC; # weed out all paths except pars loader refs 32 @INC = grep ref, @INC; # weed out all paths except pars loader refs
33 33
34 my $tmp = $ENV{PAR_TEMP};
35
34 while (my ($filename, $zip) = each %PAR::LibCache) { 36 while (my ($filename, $zip) = each %PAR::LibCache) {
35 for ($zip->memberNames) { 37 for ($zip->memberNames) {
36 next unless /^root\/(.*)/; 38 next unless /^root\/(.*)/;
37 $zip->extractMember ($_, "$ENV{PAR_TEMP}/$1") 39 $zip->extractMember ($_, "$tmp/$1")
38 unless -e "$ENV{PAR_TEMP}/$1"; 40 unless -e "$tmp/$1";
39 } 41 }
40 } 42 }
41 43
42 # TODO: pango-rc file, anybody? 44 if ($^O eq "MSWin32") {
45 # relocatable
46 } else {
47 # 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 or die "$tmp/usr/lib/1.5.0/module-files.d/libpango1.0-0.modules: $!";
50 local $/;
51 my $rc = <$fh>;
52 $rc =~ s/^\//$tmp\//gm; # replace abs paths by relative ones
43 53
44 unshift @INC, $ENV{PAR_TEMP}; 54 mkdir "$tmp/pango-modules";
55 open my $fh, ">:perlio", "$tmp/pango-modules/pango.modules"
56 or die "$tmp/pango-modules/pango.modules: $!";
57 print $fh $rc;
58
59 $ENV{PANGO_RC_FILE} = "$tmp/pango.rc";
60 open my $fh, ">:perlio", $ENV{PANGO_RC_FILE}
61 or die "$ENV{PANGO_RC_FILE}: $!";
62 print $fh "[Pango]\nModuleFiles = $tmp/pango-modules\n";
63 }
64
65 unshift @INC, $tmp;
45 } 66 }
46} 67}
47 68
48# need to do it again because that pile of garbage called PAR nukes it before main 69# need to do it again because that pile of garbage called PAR nukes it before main
49unshift @INC, $ENV{PAR_TEMP} 70unshift @INC, $ENV{PAR_TEMP}
207 title => "Server Query", 228 title => "Server Query",
208 child => my $vbox = new CFPlus::UI::VBox, 229 child => my $vbox = new CFPlus::UI::VBox,
209 ; 230 ;
210 231
211 my @dialog = my $label = new CFPlus::UI::Label 232 my @dialog = my $label = new CFPlus::UI::Label
212 max_w => $::WIDTH * 0.4, 233 max_w => $::WIDTH * 0.8,
213 ellipsise => 0, 234 ellipsise => 0,
214 text => $prompt; 235 text => $prompt;
215 236
216 if ($flags & CS_QUERY_YESNO) { 237 if ($flags & CS_QUERY_YESNO) {
217 push @dialog, my $hbox = new CFPlus::UI::HBox; 238 push @dialog, my $hbox = new CFPlus::UI::HBox;
234 ); 255 );
235 256
236 $dialog->grab_focus; 257 $dialog->grab_focus;
237 258
238 } elsif ($flags & CS_QUERY_SINGLECHAR) { 259 } elsif ($flags & CS_QUERY_SINGLECHAR) {
239 $dialog->{tooltip} = "#charcreation_focus";
240
241 if ($prompt =~ /Now choose a character|Press any key for the next race/i) { 260 if ($prompt =~ /Now choose a character|Press any key for the next race/i) {
242 $MESSAGE_WINDOW->show; 261 $dialog->{tooltip} = "#charcreation_focus";
243 262
244 unshift @dialog, new CFPlus::UI::Label 263 unshift @dialog, new CFPlus::UI::Label
245 max_w => $::WIDTH * 0.4, 264 max_w => $::WIDTH * 0.8,
246 ellipsise => 0, 265 ellipsise => 0,
247 markup => "\nOr use your keyboard and the text entry below:\n"; 266 markup => "\nOr use your keyboard and the text entry below:\n";
248 267
249 unshift @dialog, my $table = new CFPlus::UI::Table; 268 unshift @dialog, my $table = new CFPlus::UI::Table;
250 269
262 $conn->send ("reply d"); 281 $conn->send ("reply d");
263 destroy_query_dialog $conn; 282 destroy_query_dialog $conn;
264 0 283 0
265 }, 284 },
266 ); 285 );
286
287 if ($conn->{chargen_race_description}) {
288 unshift @dialog, new CFPlus::UI::Label
289 max_w => $::WIDTH * 0.8,
290 ellipsise => 0,
291 markup => "<span foreground='#ccccff'>$conn->{chargen_race_description}</span>",
292 ;
293 }
294
295 unshift @dialog, new CFPlus::UI::Face
296 face => $conn->{player}{face},
297 bg => [.2, .2, .2, 1],
298 min_w => 64,
299 min_h => 64,
300 ;
301
302 if ($conn->{chargen_race_title}) {
303 unshift @dialog, new CFPlus::UI::Label
304 allign => 1,
305 ellipsise => 0,
306 markup => "<span foreground='#ccccff' size='large'>Race: $conn->{chargen_race_title}</span>",
307 ;
308 }
267 309
268 unshift @dialog, new CFPlus::UI::Label 310 unshift @dialog, new CFPlus::UI::Label
269 max_w => $::WIDTH * 0.4, 311 max_w => $::WIDTH * 0.4,
270 ellipsise => 0, 312 ellipsise => 0,
271 markup => (CFPlus::Pod::section_label ui => "chargen_race"), 313 markup => (CFPlus::Pod::section_label ui => "chargen_race"),
1433 $ntb->add ( 1475 $ntb->add (
1434 "Inventory (F5)" => $INVENTORY_PAGE = inventory_widget, 1476 "Inventory (F5)" => $INVENTORY_PAGE = inventory_widget,
1435 "Toggles the inventory window, where you can manage your loot (or treasures :). " 1477 "Toggles the inventory window, where you can manage your loot (or treasures :). "
1436 . "You can also hit the <b>Tab</b>-key to show/hide the Inventory." 1478 . "You can also hit the <b>Tab</b>-key to show/hide the Inventory."
1437 ); 1479 );
1480 $ntb->add (Pickup => autopickup_setup,
1481 "Configure autopickup settings, i.e. which items you will pick up automatically when walking (or running) over them.");
1438 1482
1439 $ntb->set_current_page ($INVENTORY_PAGE); 1483 $ntb->set_current_page ($INVENTORY_PAGE);
1440 1484
1441 $plwin->add ($ntb); 1485 $plwin->add ($ntb);
1442 $plwin 1486 $plwin
1769 1813
1770 $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup, 1814 $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup,
1771 "Configure the server to play on, your username, password and other server-related options."); 1815 "Configure the server to play on, your username, password and other server-related options.");
1772 $SETUP_NOTEBOOK->add (Client => client_setup, 1816 $SETUP_NOTEBOOK->add (Client => client_setup,
1773 "Configure various client-specific settings."); 1817 "Configure various client-specific settings.");
1774 $SETUP_NOTEBOOK->add (Pickup => autopickup_setup,
1775 "Configure autopickup settings, i.e. which items you will pick up automatically when walking (or running) over them.");
1776 $SETUP_NOTEBOOK->add (Graphics => graphics_setup, 1818 $SETUP_NOTEBOOK->add (Graphics => graphics_setup,
1777 "Configure the video mode, performance, fonts and other graphical aspects of the game."); 1819 "Configure the video mode, performance, fonts and other graphical aspects of the game.");
1778 $SETUP_NOTEBOOK->add (Audio => audio_setup, 1820 $SETUP_NOTEBOOK->add (Audio => audio_setup,
1779 "Configure the use of audio, sound effects and background music."); 1821 "Configure the use of audio, sound effects and background music.");
1780 $SETUP_NOTEBOOK->add (Keyboard => $SETUP_KEYBOARD = keyboard_setup, 1822 $SETUP_NOTEBOOK->add (Keyboard => $SETUP_KEYBOARD = keyboard_setup,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines