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

Comparing deliantra/Deliantra-Client/bin/pclient (file contents):
Revision 1.215 by root, Mon May 15 00:15:08 2006 UTC vs.
Revision 1.216 by root, Mon May 15 17:45:31 2006 UTC

164 $vbox->add (my $table = new CFClient::UI::Table expand => 1, col_expand => [0, 1]); 164 $vbox->add (my $table = new CFClient::UI::Table expand => 1, col_expand => [0, 1]);
165 165
166 $table->add (0, 0, new CFClient::UI::Label valign => 0, align => 1, text => "Video Mode"); 166 $table->add (0, 0, new CFClient::UI::Label valign => 0, align => 1, text => "Video Mode");
167 $table->add (1, 0, my $hbox = new CFClient::UI::HBox); 167 $table->add (1, 0, my $hbox = new CFClient::UI::HBox);
168 168
169 $hbox->add (my $mode_slider = new CFClient::UI::Slider expand => 1, req_w => 100, range => [$CFG->{sdl_mode}, 0, scalar @SDL_MODES, 1]); 169 $hbox->add (my $mode_slider = new CFClient::UI::Slider expand => 1, req_w => 100, range => [$CFG->{sdl_mode}, 0, $#SDL_MODES, 1, 1]);
170 $hbox->add (my $mode_label = new CFClient::UI::Label align => 0, valign => 0, height => 0.8, template => "9999x9999"); 170 $hbox->add (my $mode_label = new CFClient::UI::Label align => 0, valign => 0, height => 0.8, template => "9999x9999");
171 171
172 $mode_slider->connect (changed => sub { 172 $mode_slider->connect (changed => sub {
173 my ($self, $value) = @_; 173 my ($self, $value) = @_;
174 174
199 } 199 }
200 ); 200 );
201 201
202 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Map Scale"); 202 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Map Scale");
203 $table->add (1, $row++, new CFClient::UI::Slider 203 $table->add (1, $row++, new CFClient::UI::Slider
204 range => [$CFG->{map_scale}, 0.25, 2, 0.05], 204 range => [$CFG->{map_scale}, 0.25, 2, 0.05, 0.05],
205 tooltip => "Enlarge or shrink the displayed map", 205 tooltip => "Enlarge or shrink the displayed map",
206 connect_changed => sub { 206 connect_changed => sub {
207 my ($self, $value) = @_; 207 my ($self, $value) = @_;
208 $CFG->{map_scale} = 0.05 * int $value / 0.05; 208 $CFG->{map_scale} = $value;
209 } 209 }
210 ); 210 );
211 211
212 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fog of War"); 212 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fog of War");
213 $table->add (1, $row++, new CFClient::UI::CheckBox 213 $table->add (1, $row++, new CFClient::UI::CheckBox
240 } 240 }
241 ); 241 );
242 242
243 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "GUI Fontsize"); 243 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "GUI Fontsize");
244 $table->add (1, $row++, new CFClient::UI::Slider 244 $table->add (1, $row++, new CFClient::UI::Slider
245 range => [$CFG->{gui_fontsize}, 0.5, 2, 0.1], 245 range => [$CFG->{gui_fontsize}, 0.5, 2, 0.1, 0.1],
246 tooltip => "The font size used by most GUI elements", 246 tooltip => "The font size used by most GUI elements",
247 connect_changed => sub { 247 connect_changed => sub { $CFG->{gui_fontsize} = $_[1] },
248 $CFG->{gui_fontsize} = 0.1 * int $_[1] * 10;
249# $FONTSIZE = int $HEIGHT / 40 * $CFG->{gui_fontsize};
250 }
251 ); 248 );
252 249
253 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Server Log Fontsize"); 250 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Server Log Fontsize");
254 $table->add (1, $row++, new CFClient::UI::Slider 251 $table->add (1, $row++, new CFClient::UI::Slider
255 range => [$CFG->{log_fontsize}, 0.5, 2, 0.1], 252 range => [$CFG->{log_fontsize}, 0.5, 2, 0.1, 0.1],
256 tooltip => "The font size used by the server log window only", 253 tooltip => "The font size used by the server log window only",
257 connect_changed => sub { 254 connect_changed => sub { $LOGVIEW->set_fontsize ($CFG->{log_fontsize} = $_[1]) },
258 $LOGVIEW->set_fontsize ($CFG->{log_fontsize} = 0.1 * int $_[1] * 10);
259 }
260 ); 255 );
261 256
262 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Stats Fontsize"); 257 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Stats Fontsize");
263 258
264 $table->add (1, $row++, new CFClient::UI::Slider 259 $table->add (1, $row++, new CFClient::UI::Slider
265 range => [$CFG->{stat_fontsize}, 0.5, 2, 0.1], 260 range => [$CFG->{stat_fontsize}, 0.5, 2, 0.1, 0.1],
266 tooltip => "The font size used by the statistics window only", 261 tooltip => "The font size used by the statistics window only",
267 connect_changed => sub { 262 connect_changed => sub {
268 $CFG->{stat_fontsize} = 0.1 * int $_[1] * 10; 263 $CFG->{stat_fontsize} = $_[1];
269 &set_stats_window_fontsize; 264 &set_stats_window_fontsize;
270 } 265 }
271 ); 266 );
272 267
273 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge size"); 268 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge size");
274 $table->add (1, $row++, new CFClient::UI::Slider 269 $table->add (1, $row++, new CFClient::UI::Slider
275 range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02], 270 range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02],
276 tooltip => "Adjust the size of the stats gauges at the bottom right", 271 tooltip => "Adjust the size of the stats gauges at the bottom right",
277 connect_changed => sub { 272 connect_changed => sub {
278 $CFG->{gauge_size} = $_[1]; 273 $CFG->{gauge_size} = $_[1];
279 my $h = int $HEIGHT * $CFG->{gauge_size}; 274 $GAUGES->{win}->set_size ($WIDTH, int $HEIGHT * $CFG->{gauge_size});
280 $GAUGES->{win}->set_size ($WIDTH, $h);
281 $GAUGES->{win}->move (0, $HEIGHT - $h);
282 } 275 }
283 ); 276 );
284 277
285 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize"); 278 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize");
286 $table->add (1, $row++, new CFClient::UI::Slider 279 $table->add (1, $row++, new CFClient::UI::Slider
287 range => [$CFG->{gauge_fontsize}, 0.5, 2.0, 0.1], 280 range => [$CFG->{gauge_fontsize}, 0.5, 2.0, 0.1, 0.1],
288 tooltip => "Adjusts the fontsize of the gauges at the bottom right", 281 tooltip => "Adjusts the fontsize of the gauges at the bottom right",
289 connect_changed => sub { 282 connect_changed => sub {
290 $CFG->{gauge_fontsize} = 0.1 * int $_[1] * 10; 283 $CFG->{gauge_fontsize} = $_[1];
291 &set_gauge_window_fontsize; 284 &set_gauge_window_fontsize;
292 } 285 }
293 ); 286 );
294 287
295 $table->add (1, $row++, new CFClient::UI::Button 288 $table->add (1, $row++, new CFClient::UI::Button
736 ); 729 );
737 730
738 $table->add (0, 7, new CFClient::UI::Label valign => 0, align => 1, text => "Map Size"); 731 $table->add (0, 7, new CFClient::UI::Label valign => 0, align => 1, text => "Map Size");
739 $table->add (1, 7, new CFClient::UI::Slider 732 $table->add (1, 7, new CFClient::UI::Slider
740 req_w => 100, 733 req_w => 100,
741 range => [$CFG->{mapsize}, 10, 100 + 1, 1], 734 range => [$CFG->{mapsize}, 10, 100 + 1, 1, 1],
742 tooltip => "This is the size of the portion of the map update the server sends you. " 735 tooltip => "This is the size of the portion of the map update the server sends you. "
743 ."If you set this to a high value you will be able to see further for example.", 736 ."If you set this to a high value you will be able to see further for example.",
744 connect_changed => sub { 737 connect_changed => sub {
745 my ($self, $value) = @_; 738 my ($self, $value) = @_;
746 739

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines