… | |
… | |
589 | range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1], |
589 | range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1], |
590 | tooltip => "Enlarge or shrink the displayed map. Changes are instant.", |
590 | tooltip => "Enlarge or shrink the displayed map. Changes are instant.", |
591 | on_changed => sub { my ($self, $value) = @_; $CFG->{map_scale} = 2 ** $value; 0 } |
591 | on_changed => sub { my ($self, $value) = @_; $CFG->{map_scale} = 2 ** $value; 0 } |
592 | ); |
592 | ); |
593 | |
593 | |
594 | $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Smoothing"); |
594 | $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Map Smoothing"); |
595 | $table->add (1, $row++, new CFPlus::UI::CheckBox |
595 | $table->add (1, $row++, new CFPlus::UI::CheckBox |
596 | state => $CFG->{map_smoothing}, |
596 | state => $CFG->{map_smoothing}, |
597 | tooltip => "<b>Map Smoothing</b> tries to make tile borders less square. " |
597 | tooltip => "<b>Map Smoothing</b> tries to make tile borders less square. " |
598 | . "This increases load on the graphics subsystem and works only with 2.x servers. " |
598 | . "This increases load on the graphics subsystem and works only with 2.x servers. " |
599 | . "Changes take effect at next connection only.", |
599 | . "Changes take effect at next connection only.", |
… | |
… | |
612 | range => [$CFG->{fow_intensity}, 0, 1, 0, 1 / 256], |
612 | range => [$CFG->{fow_intensity}, 0, 1, 0, 1 / 256], |
613 | tooltip => "<b>Fog of War Lightness.</b> The higher the intensity, the lighter the Fog-of-War color. Changes are instant.", |
613 | tooltip => "<b>Fog of War Lightness.</b> The higher the intensity, the lighter the Fog-of-War color. Changes are instant.", |
614 | on_changed => sub { my ($self, $value) = @_; $CFG->{fow_intensity} = $value; 0 } |
614 | on_changed => sub { my ($self, $value) = @_; $CFG->{fow_intensity} = $value; 0 } |
615 | ); |
615 | ); |
616 | |
616 | |
617 | $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "FoW Smooth"); |
617 | $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "FoW Smoothing"); |
618 | $table->add (1, $row++, new CFPlus::UI::CheckBox |
618 | $table->add (1, $row++, new CFPlus::UI::CheckBox |
619 | state => $CFG->{fow_smooth}, |
619 | state => $CFG->{fow_smooth}, |
620 | tooltip => "Smooth the Fog-of-War a bit to make it more realistic. Changes are instant.", |
620 | tooltip => "Smooth the Fog-of-War a bit to make it more realistic. Changes are instant.", |
621 | on_changed => sub { |
621 | on_changed => sub { |
622 | my ($self, $value) = @_; |
622 | my ($self, $value) = @_; |
623 | $CFG->{fow_smooth} = $value; |
623 | $CFG->{fow_smooth} = $value; |
624 | status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFPlus::OpenGL::GL_VERSION < 1.2; |
|
|
625 | 0 |
624 | 0 |
626 | } |
625 | } |
627 | ); |
626 | ); |
628 | |
627 | |
629 | $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Message Fontsize"); |
628 | $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Message Fontsize"); |
… | |
… | |
764 | $table->add (0, 2, new CFPlus::UI::Label text => "Show FPS"); |
763 | $table->add (0, 2, new CFPlus::UI::Label text => "Show FPS"); |
765 | $table->add (1, 2, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 4; 0 }); |
764 | $table->add (1, 2, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 4; 0 }); |
766 | $table->add (0, 3, new CFPlus::UI::Label text => "Suppress Tooltips"); |
765 | $table->add (0, 3, new CFPlus::UI::Label text => "Suppress Tooltips"); |
767 | $table->add (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 }); |
766 | $table->add (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 }); |
768 | $table->add (0, 4, new CFPlus::UI::Button text => "die on click(tm)", on_activate => sub { &CFPlus::debug() } ); |
767 | $table->add (0, 4, new CFPlus::UI::Button text => "die on click(tm)", on_activate => sub { &CFPlus::debug() } ); |
769 | |
|
|
770 | my @default_smooth = (0.05, 0.13, 0.05, 0.13, 0.30, 0.13, 0.05, 0.13, 0.05); |
|
|
771 | |
|
|
772 | for my $x (0..2) { |
|
|
773 | for my $y (0 .. 2) { |
|
|
774 | $table->add ($x + 3, $y, |
|
|
775 | new CFPlus::UI::Entry |
|
|
776 | text => $default_smooth[$x * 3 + $y], |
|
|
777 | on_changed => sub { $MAP->{smooth_matrix}[$x * 3 + $y] = $_[1] if $MAP; 0 }, |
|
|
778 | ); |
|
|
779 | } |
|
|
780 | } |
|
|
781 | |
768 | |
782 | $table->add (0, 5, new CFPlus::UI::TextEdit text => "line1\0152\0153");#d# |
769 | $table->add (0, 5, new CFPlus::UI::TextEdit text => "line1\0152\0153");#d# |
783 | |
770 | |
784 | $table |
771 | $table |
785 | } |
772 | } |
… | |
… | |
2266 | height => 480, |
2253 | height => 480, |
2267 | fullscreen => 0, |
2254 | fullscreen => 0, |
2268 | fast => 0, |
2255 | fast => 0, |
2269 | map_scale => 1, |
2256 | map_scale => 1, |
2270 | fow_enable => 1, |
2257 | fow_enable => 1, |
2271 | fow_intensity => 0.45, |
2258 | fow_intensity => 0, |
2272 | fow_smooth => 0, |
2259 | fow_smooth => 1, |
2273 | map_smoothing => 1, |
2260 | map_smoothing => 1, |
2274 | gui_fontsize => 1, |
2261 | gui_fontsize => 1, |
2275 | log_fontsize => 0.7, |
2262 | log_fontsize => 0.7, |
2276 | gauge_fontsize => 1, |
2263 | gauge_fontsize => 1, |
2277 | gauge_size => 0.35, |
2264 | gauge_size => 0.35, |