… | |
… | |
117 | my ($self, $value) = @_; |
117 | my ($self, $value) = @_; |
118 | $CFG->{fast} = $value; |
118 | $CFG->{fast} = $value; |
119 | }); |
119 | }); |
120 | |
120 | |
121 | $table->add (0, 3, new CFClient::UI::Label align => 1, text => "Fog of War"); |
121 | $table->add (0, 3, new CFClient::UI::Label align => 1, text => "Fog of War"); |
|
|
122 | $table->add (1, 3, new CFClient::UI::CheckBox state => $CFG->{fow_enable}, connect_changed => sub { |
|
|
123 | my ($self, $value) = @_; |
|
|
124 | $CFG->{fow_enable} = $value; |
|
|
125 | }); |
|
|
126 | |
|
|
127 | $table->add (0, 4, new CFClient::UI::Label align => 1, text => "FoW Intensity"); |
122 | $table->add (1, 3, new CFClient::UI::Slider range => [$CFG->{fow_intensity}, 0, 1 + 0.001, 0.001], connect_changed => sub { |
128 | $table->add (1, 4, new CFClient::UI::Slider range => [$CFG->{fow_intensity}, 0, 1 + 0.001, 0.001], connect_changed => sub { |
123 | my ($self, $value) = @_; |
129 | my ($self, $value) = @_; |
124 | $CFG->{fow_intensity} = $value; |
130 | $CFG->{fow_intensity} = $value; |
125 | }); |
131 | }); |
126 | |
132 | |
127 | $table->add (0, 4, new CFClient::UI::Label align => 1, text => "Smooth FoW"); |
133 | $table->add (0, 5, new CFClient::UI::Label align => 1, text => "FoW Smooth"); |
128 | $table->add (1, 4, new CFClient::UI::CheckBox state => $CFG->{fow_smooth}, connect_changed => sub { |
134 | $table->add (1, 5, new CFClient::UI::CheckBox state => $CFG->{fow_smooth}, connect_changed => sub { |
129 | my ($self, $value) = @_; |
135 | my ($self, $value) = @_; |
130 | $CFG->{fow_smooth} = $value; |
136 | $CFG->{fow_smooth} = $value; |
131 | }); |
137 | }); |
132 | |
138 | |
133 | $table->add (1, 5, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub { |
139 | $table->add (1, 6, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub { |
134 | destroy_screen (); |
140 | destroy_screen (); |
135 | init_screen (); |
141 | init_screen (); |
136 | }); |
142 | }); |
137 | |
143 | |
138 | $vbox->add (new CFClient::UI::Label align => 0, text => "Server Setup"); |
144 | $vbox->add (new CFClient::UI::Label align => 0, text => "Server Setup"); |
… | |
… | |
411 | |
417 | |
412 | my %DEF_CFG = ( |
418 | my %DEF_CFG = ( |
413 | width => 640, |
419 | width => 640, |
414 | height => 480, |
420 | height => 480, |
415 | fast => 0, |
421 | fast => 0, |
|
|
422 | fow_enable => 1, |
416 | fow_intensity => 0.45, |
423 | fow_intensity => 0.45, |
417 | fow_smooth => 0, |
424 | fow_smooth => 0, |
418 | fullscreen => 0, |
425 | fullscreen => 0, |
419 | sdl_mode => 0, |
426 | sdl_mode => 0, |
420 | mapsize => 100, |
427 | mapsize => 100, |