--- deliantra/Deliantra-Client/bin/deliantra 2008/09/01 15:19:07 1.71
+++ deliantra/Deliantra-Client/bin/deliantra 2008/09/03 12:50:43 1.76
@@ -894,6 +894,19 @@
. "by selecting a different video mode, changing the settings below or "
. "by installing the right driver for your graphics card.");
+ $table->add_at (0, $row, new DC::UI::Label align => 1, text => "UI Theme");
+ $table->add_at (1, $row++, $FULLSCREEN_ENABLE = new DC::UI::Selector
+ value => $CFG->{uitheme},
+ options => [
+ [wood => "Wood (the default)"],
+ [plain => "Plain (very)"],
+ [blue => "Blue (dark)"],
+ [metal => "Metal (light)"],
+ ],
+ tooltip => "Choose the User Interface theme that you like most :)",
+ on_changed => sub { my ($self, $value) = @_; $CFG->{uitheme} = $value; 0 }
+ );
+
my $vidmode_tooltip =
"Video Mode. The video mode to use for fullscreen (and the window size for windowed operation). "
. "The format is width x height \@ depth-per-channel + alpha-channel.";
@@ -2251,6 +2264,8 @@
}
sub video_init {
+ DC::set_theme $CFG->{uitheme};
+
DC::SDL_InitSubSystem DC::SDL_INIT_VIDEO if $SDL_REINIT;
$SDL_REINIT = 0;
@@ -2264,7 +2279,7 @@
if (!defined $CFG->{sdl_mode} or $CFG->{sdl_mode} > $#SDL_MODES) {
$CFG->{sdl_mode} = 0; # lowest resolution by default
- # now choose biggets mode <= 1024x768
+ # now choose biggest mode <= 1024x768
for (0 .. $#SDL_MODES) {
if ($SDL_MODES[$_][0] * $SDL_MODES[$_][1] <= 1024 * 768) {
$CFG->{sdl_mode} = $_;
@@ -2357,7 +2372,7 @@
border_bg => [1, 1, 1, 192/255],
bg => [1, 1, 1, 0],
child => ($MAPMAP = new DC::MapWidget::MapMap
- tooltip => "Map. On servers that support this feature, this will display an overview of the surrounding areas.",
+ tooltip => "Minimap. This will display an overview of the surrounding areas.",
),
)->show;
@@ -2466,7 +2481,7 @@
$MESSAGE_WINDOW->show;
}
- $MODE_SLIDER->set_range ([$CFG->{sdl_mode}, 0, $#SDL_MODES, 1, 1]);
+ $MODE_SLIDER->set_range ([$CFG->{sdl_mode}, 0, scalar @SDL_MODES, 1, 1]);
$MODE_SLIDER->emit (changed => $CFG->{sdl_mode});
$CAVEAT_LABEL->set_text ("None :)");
@@ -2641,6 +2656,7 @@
show_tips => 1,
logview_max_par => 1000,
shift_fire_stop => 0,
+ uitheme => "wood",
);
while (my ($k, $v) = each %DEF_CFG) {