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

Comparing deliantra/Deliantra-Client/bin/deliantra (file contents):
Revision 1.69 by root, Mon Sep 1 15:08:15 2008 UTC vs.
Revision 1.75 by root, Wed Sep 3 10:08:18 2008 UTC

76 $ENV{FC_CONFIG_FILE} = "$root/fonts.conf"; # no effect??!?! 76 $ENV{FC_CONFIG_FILE} = "$root/fonts.conf"; # no effect??!?!
77 $ENV{FC_CONFIG_DIR} = $root; # no effect??!?! 77 $ENV{FC_CONFIG_DIR} = $root; # no effect??!?!
78 $ENV{PANGO_RC_FILE} = "$root/pango.rc"; 78 $ENV{PANGO_RC_FILE} = "$root/pango.rc";
79 $ENV{DYLD_LIBRARY_PATH} = $root; 79 $ENV{DYLD_LIBRARY_PATH} = $root;
80 chdir $root; # for pango modules, maybe other things 80 chdir $root; # for pango modules, maybe other things
81 symlink "libjpeg.62.dylib", "libjpeg.dylib";
82 } 81 }
83 82
84 unshift @INC, $root; 83 unshift @INC, $root;
85 } 84 }
86} 85}
892 can_events => 1, 891 can_events => 1,
893 tooltip => "This field shows any known issues with your config or driver, such as " 892 tooltip => "This field shows any known issues with your config or driver, such as "
894 . "a non-accelerated display format. You can try to work around these issues " 893 . "a non-accelerated display format. You can try to work around these issues "
895 . "by selecting a different video mode, changing the settings below or " 894 . "by selecting a different video mode, changing the settings below or "
896 . "by installing the right driver for your graphics card."); 895 . "by installing the right driver for your graphics card.");
896
897 $table->add_at (0, $row, new DC::UI::Label align => 1, text => "UI Theme");
898 $table->add_at (1, $row++, $FULLSCREEN_ENABLE = new DC::UI::Selector
899 value => $CFG->{uitheme},
900 options => [
901 [wood => "Wood (the default)"],
902 [plain => "Plain (very)"],
903 [blue => "Blue"],
904 ],
905 tooltip => "Choose the User Interface theme that you like most :)",
906 on_changed => sub { my ($self, $value) = @_; $CFG->{uitheme} = $value; 0 }
907 );
897 908
898 my $vidmode_tooltip = 909 my $vidmode_tooltip =
899 "<b>Video Mode.</b> The video mode to use for fullscreen (and the window size for windowed operation). " 910 "<b>Video Mode.</b> The video mode to use for fullscreen (and the window size for windowed operation). "
900 . "The format is <i>width</i> x <i>height</i> \@ <i>depth-per-channel</i> + <i>alpha-channel</i>."; 911 . "The format is <i>width</i> x <i>height</i> \@ <i>depth-per-channel</i> + <i>alpha-channel</i>.";
901 912
2250 DC::SDL_Init DC::SDL_INIT_AUDIO #| DC::SDL_NOPARACHUTE 2261 DC::SDL_Init DC::SDL_INIT_AUDIO #| DC::SDL_NOPARACHUTE
2251 and die "SDL::Init failed!\n"; 2262 and die "SDL::Init failed!\n";
2252} 2263}
2253 2264
2254sub video_init { 2265sub video_init {
2266 DC::set_theme $CFG->{uitheme};
2267
2255 DC::SDL_InitSubSystem DC::SDL_INIT_VIDEO if $SDL_REINIT; 2268 DC::SDL_InitSubSystem DC::SDL_INIT_VIDEO if $SDL_REINIT;
2256 $SDL_REINIT = 0; 2269 $SDL_REINIT = 0;
2257 2270
2258 @SDL_MODES = DC::SDL_ListModes 8, $CFG->{disable_alpha} ? 0 : 8; 2271 @SDL_MODES = DC::SDL_ListModes 8, $CFG->{disable_alpha} ? 0 : 8;
2259 @SDL_MODES = DC::SDL_ListModes 8, 8 unless @SDL_MODES; 2272 @SDL_MODES = DC::SDL_ListModes 8, 8 unless @SDL_MODES;
2263 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES; 2276 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES;
2264 2277
2265 if (!defined $CFG->{sdl_mode} or $CFG->{sdl_mode} > $#SDL_MODES) { 2278 if (!defined $CFG->{sdl_mode} or $CFG->{sdl_mode} > $#SDL_MODES) {
2266 $CFG->{sdl_mode} = 0; # lowest resolution by default 2279 $CFG->{sdl_mode} = 0; # lowest resolution by default
2267 2280
2268 # now choose biggets mode <= 1024x768 2281 # now choose biggest mode <= 1024x768
2269 for (0 .. $#SDL_MODES) { 2282 for (0 .. $#SDL_MODES) {
2270 if ($SDL_MODES[$_][0] * $SDL_MODES[$_][1] <= 1024 * 768) { 2283 if ($SDL_MODES[$_][0] * $SDL_MODES[$_][1] <= 1024 * 768) {
2271 $CFG->{sdl_mode} = $_; 2284 $CFG->{sdl_mode} = $_;
2272 } 2285 }
2273 } 2286 }
2356 x => 0, 2369 x => 0,
2357 y => $FONTSIZE + 8, 2370 y => $FONTSIZE + 8,
2358 border_bg => [1, 1, 1, 192/255], 2371 border_bg => [1, 1, 1, 192/255],
2359 bg => [1, 1, 1, 0], 2372 bg => [1, 1, 1, 0],
2360 child => ($MAPMAP = new DC::MapWidget::MapMap 2373 child => ($MAPMAP = new DC::MapWidget::MapMap
2361 tooltip => "<b>Map</b>. On servers that support this feature, this will display an overview of the surrounding areas.", 2374 tooltip => "<b>Minimap</b>. This will display an overview of the surrounding areas.",
2362 ), 2375 ),
2363 )->show; 2376 )->show;
2364 2377
2365 $MAPWIDGET = new DC::MapWidget; 2378 $MAPWIDGET = new DC::MapWidget;
2366 $MAPWIDGET->connect (activate_console => sub { 2379 $MAPWIDGET->connect (activate_console => sub {
2465 $BUTTONBAR->show; 2478 $BUTTONBAR->show;
2466 $SETUP_DIALOG->show; 2479 $SETUP_DIALOG->show;
2467 $MESSAGE_WINDOW->show; 2480 $MESSAGE_WINDOW->show;
2468 } 2481 }
2469 2482
2470 $MODE_SLIDER->set_range ([$CFG->{sdl_mode}, 0, $#SDL_MODES, 1, 1]); 2483 $MODE_SLIDER->set_range ([$CFG->{sdl_mode}, 0, scalar @SDL_MODES, 1, 1]);
2471 $MODE_SLIDER->emit (changed => $CFG->{sdl_mode}); 2484 $MODE_SLIDER->emit (changed => $CFG->{sdl_mode});
2472 2485
2473 $CAVEAT_LABEL->set_text ("None :)"); 2486 $CAVEAT_LABEL->set_text ("None :)");
2474 $CAVEAT_LABEL->set_text ("Software Rendering (very slow)") 2487 $CAVEAT_LABEL->set_text ("Software Rendering (very slow)")
2475 unless DC::SDL_GL_GetAttribute DC::SDL_GL_ACCELERATED_VISUAL; 2488 unless DC::SDL_GL_GetAttribute DC::SDL_GL_ACCELERATED_VISUAL;
2640 inv_sort => "mtime", 2653 inv_sort => "mtime",
2641 default => "profile", # default profile 2654 default => "profile", # default profile
2642 show_tips => 1, 2655 show_tips => 1,
2643 logview_max_par => 1000, 2656 logview_max_par => 1000,
2644 shift_fire_stop => 0, 2657 shift_fire_stop => 0,
2658 uitheme => "wood",
2645 ); 2659 );
2646 2660
2647 while (my ($k, $v) = each %DEF_CFG) { 2661 while (my ($k, $v) = each %DEF_CFG) {
2648 $CFG->{$k} = $v unless exists $CFG->{$k}; 2662 $CFG->{$k} = $v unless exists $CFG->{$k};
2649 } 2663 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines