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.71 by root, Mon Sep 1 15:19:07 2008 UTC vs.
Revision 1.76 by root, Wed Sep 3 12:50:43 2008 UTC

891 can_events => 1, 891 can_events => 1,
892 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 "
893 . "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 "
894 . "by selecting a different video mode, changing the settings below or " 894 . "by selecting a different video mode, changing the settings below or "
895 . "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 (dark)"],
904 [metal => "Metal (light)"],
905 ],
906 tooltip => "Choose the User Interface theme that you like most :)",
907 on_changed => sub { my ($self, $value) = @_; $CFG->{uitheme} = $value; 0 }
908 );
896 909
897 my $vidmode_tooltip = 910 my $vidmode_tooltip =
898 "<b>Video Mode.</b> The video mode to use for fullscreen (and the window size for windowed operation). " 911 "<b>Video Mode.</b> The video mode to use for fullscreen (and the window size for windowed operation). "
899 . "The format is <i>width</i> x <i>height</i> \@ <i>depth-per-channel</i> + <i>alpha-channel</i>."; 912 . "The format is <i>width</i> x <i>height</i> \@ <i>depth-per-channel</i> + <i>alpha-channel</i>.";
900 913
2249 DC::SDL_Init DC::SDL_INIT_AUDIO #| DC::SDL_NOPARACHUTE 2262 DC::SDL_Init DC::SDL_INIT_AUDIO #| DC::SDL_NOPARACHUTE
2250 and die "SDL::Init failed!\n"; 2263 and die "SDL::Init failed!\n";
2251} 2264}
2252 2265
2253sub video_init { 2266sub video_init {
2267 DC::set_theme $CFG->{uitheme};
2268
2254 DC::SDL_InitSubSystem DC::SDL_INIT_VIDEO if $SDL_REINIT; 2269 DC::SDL_InitSubSystem DC::SDL_INIT_VIDEO if $SDL_REINIT;
2255 $SDL_REINIT = 0; 2270 $SDL_REINIT = 0;
2256 2271
2257 @SDL_MODES = DC::SDL_ListModes 8, $CFG->{disable_alpha} ? 0 : 8; 2272 @SDL_MODES = DC::SDL_ListModes 8, $CFG->{disable_alpha} ? 0 : 8;
2258 @SDL_MODES = DC::SDL_ListModes 8, 8 unless @SDL_MODES; 2273 @SDL_MODES = DC::SDL_ListModes 8, 8 unless @SDL_MODES;
2262 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES; 2277 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES;
2263 2278
2264 if (!defined $CFG->{sdl_mode} or $CFG->{sdl_mode} > $#SDL_MODES) { 2279 if (!defined $CFG->{sdl_mode} or $CFG->{sdl_mode} > $#SDL_MODES) {
2265 $CFG->{sdl_mode} = 0; # lowest resolution by default 2280 $CFG->{sdl_mode} = 0; # lowest resolution by default
2266 2281
2267 # now choose biggets mode <= 1024x768 2282 # now choose biggest mode <= 1024x768
2268 for (0 .. $#SDL_MODES) { 2283 for (0 .. $#SDL_MODES) {
2269 if ($SDL_MODES[$_][0] * $SDL_MODES[$_][1] <= 1024 * 768) { 2284 if ($SDL_MODES[$_][0] * $SDL_MODES[$_][1] <= 1024 * 768) {
2270 $CFG->{sdl_mode} = $_; 2285 $CFG->{sdl_mode} = $_;
2271 } 2286 }
2272 } 2287 }
2355 x => 0, 2370 x => 0,
2356 y => $FONTSIZE + 8, 2371 y => $FONTSIZE + 8,
2357 border_bg => [1, 1, 1, 192/255], 2372 border_bg => [1, 1, 1, 192/255],
2358 bg => [1, 1, 1, 0], 2373 bg => [1, 1, 1, 0],
2359 child => ($MAPMAP = new DC::MapWidget::MapMap 2374 child => ($MAPMAP = new DC::MapWidget::MapMap
2360 tooltip => "<b>Map</b>. On servers that support this feature, this will display an overview of the surrounding areas.", 2375 tooltip => "<b>Minimap</b>. This will display an overview of the surrounding areas.",
2361 ), 2376 ),
2362 )->show; 2377 )->show;
2363 2378
2364 $MAPWIDGET = new DC::MapWidget; 2379 $MAPWIDGET = new DC::MapWidget;
2365 $MAPWIDGET->connect (activate_console => sub { 2380 $MAPWIDGET->connect (activate_console => sub {
2464 $BUTTONBAR->show; 2479 $BUTTONBAR->show;
2465 $SETUP_DIALOG->show; 2480 $SETUP_DIALOG->show;
2466 $MESSAGE_WINDOW->show; 2481 $MESSAGE_WINDOW->show;
2467 } 2482 }
2468 2483
2469 $MODE_SLIDER->set_range ([$CFG->{sdl_mode}, 0, $#SDL_MODES, 1, 1]); 2484 $MODE_SLIDER->set_range ([$CFG->{sdl_mode}, 0, scalar @SDL_MODES, 1, 1]);
2470 $MODE_SLIDER->emit (changed => $CFG->{sdl_mode}); 2485 $MODE_SLIDER->emit (changed => $CFG->{sdl_mode});
2471 2486
2472 $CAVEAT_LABEL->set_text ("None :)"); 2487 $CAVEAT_LABEL->set_text ("None :)");
2473 $CAVEAT_LABEL->set_text ("Software Rendering (very slow)") 2488 $CAVEAT_LABEL->set_text ("Software Rendering (very slow)")
2474 unless DC::SDL_GL_GetAttribute DC::SDL_GL_ACCELERATED_VISUAL; 2489 unless DC::SDL_GL_GetAttribute DC::SDL_GL_ACCELERATED_VISUAL;
2639 inv_sort => "mtime", 2654 inv_sort => "mtime",
2640 default => "profile", # default profile 2655 default => "profile", # default profile
2641 show_tips => 1, 2656 show_tips => 1,
2642 logview_max_par => 1000, 2657 logview_max_par => 1000,
2643 shift_fire_stop => 0, 2658 shift_fire_stop => 0,
2659 uitheme => "wood",
2644 ); 2660 );
2645 2661
2646 while (my ($k, $v) = each %DEF_CFG) { 2662 while (my ($k, $v) = each %DEF_CFG) {
2647 $CFG->{$k} = $v unless exists $CFG->{$k}; 2663 $CFG->{$k} = $v unless exists $CFG->{$k};
2648 } 2664 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines