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.161 by elmex, Sun Apr 23 00:08:31 2006 UTC vs.
Revision 1.166 by elmex, Sun Apr 23 02:50:44 2006 UTC

120 $mode_slider->emit (changed => $mode_slider->{range}[0]); 120 $mode_slider->emit (changed => $mode_slider->{range}[0]);
121 121
122 my $row = 1; 122 my $row = 1;
123 123
124 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fullscreen"); 124 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fullscreen");
125 $table->add (1, $row++, new CFClient::UI::CheckBox state => $CFG->{fullscreen}, connect_changed => sub { 125 $table->add (1, $row++, new CFClient::UI::CheckBox
126 state => $CFG->{fullscreen},
127 tooltip => "Bring the client into fullscreen mode",
128 connect_changed => sub {
126 my ($self, $value) = @_; 129 my ($self, $value) = @_;
127 $CFG->{fullscreen} = $value; 130 $CFG->{fullscreen} = $value;
131 }
128 }); 132 );
129 133
130 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fast & Ugly"); 134 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fast & Ugly");
131 $table->add (1, $row++, new CFClient::UI::CheckBox state => $CFG->{fast}, connect_changed => sub { 135 $table->add (1, $row++, new CFClient::UI::CheckBox
136 state => $CFG->{fast},
137 tooltip => "Lower the visual quality considerably to speed up rendering.",
138 connect_changed => sub {
132 my ($self, $value) = @_; 139 my ($self, $value) = @_;
133 $CFG->{fast} = $value; 140 $CFG->{fast} = $value;
141 }
134 }); 142 );
135 143
136 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fog of War"); 144 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fog of War");
137 $table->add (1, $row++, new CFClient::UI::CheckBox state => $CFG->{fow_enable}, connect_changed => sub { 145 $table->add (1, $row++, new CFClient::UI::CheckBox
146 state => $CFG->{fow_enable},
147 tooltip => "Fog-of-War marks areas that cannot be seen by the player",
148 connect_changed => sub {
138 my ($self, $value) = @_; 149 my ($self, $value) = @_;
139 $CFG->{fow_enable} = $value; 150 $CFG->{fow_enable} = $value;
151 }
140 }); 152 );
141 153
142 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "FoW Intensity"); 154 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "FoW Intensity");
143 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{fow_intensity}, 0, 1 + 0.001, 0.001], connect_changed => sub { 155 $table->add (1, $row++, new CFClient::UI::Slider
156 range => [$CFG->{fow_intensity}, 0, 1 + 0.001, 0.001],
157 tooltip => "The higher the intensity, the lighter the Fog-of-War color",
158 connect_changed => sub {
144 my ($self, $value) = @_; 159 my ($self, $value) = @_;
145 $CFG->{fow_intensity} = $value; 160 $CFG->{fow_intensity} = $value;
161 }
146 }); 162 );
147 163
148 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "FoW Smooth"); 164 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "FoW Smooth");
149 $table->add (1, $row++, new CFClient::UI::CheckBox state => $CFG->{fow_smooth}, connect_changed => sub { 165 $table->add (1, $row++, new CFClient::UI::CheckBox
166 state => $CFG->{fow_smooth},
167 tooltip => "Smooth the Fog-of-War a bit to make it more realistic",
168 connect_changed => sub {
150 my ($self, $value) = @_; 169 my ($self, $value) = @_;
151 $CFG->{fow_smooth} = $value; 170 $CFG->{fow_smooth} = $value;
152 status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFClient::GL_VERSION < 1.2; 171 status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFClient::GL_VERSION < 1.2;
172 }
153 }); 173 );
154 174
155 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "GUI Fontsize"); 175 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "GUI Fontsize");
156 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gui_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub { 176 $table->add (1, $row++, new CFClient::UI::Slider
177 range => [$CFG->{gui_fontsize}, 0.5, 2, 0.1],
178 tooltip => "The font size used by most GUI elements",
179 connect_changed => sub {
157 $CFG->{gui_fontsize} = 0.1 * int $_[1] * 10; 180 $CFG->{gui_fontsize} = 0.1 * int $_[1] * 10;
158# $FONTSIZE = int $HEIGHT / 40 * $CFG->{gui_fontsize}; 181# $FONTSIZE = int $HEIGHT / 40 * $CFG->{gui_fontsize};
182 }
159 }); 183 );
160 184
161 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Server Log Fontsize"); 185 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Server Log Fontsize");
162 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{log_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub { 186 $table->add (1, $row++, new CFClient::UI::Slider
187 range => [$CFG->{log_fontsize}, 0.5, 2, 0.1],
188 tooltip => "The font size used by the server log window only",
189 connect_changed => sub {
163 $LOGVIEW->set_fontsize ($CFG->{log_fontsize} = 0.1 * int $_[1] * 10); 190 $LOGVIEW->set_fontsize ($CFG->{log_fontsize} = 0.1 * int $_[1] * 10);
191 }
164 }); 192 );
165 193
166 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Stats Fontsize"); 194 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Stats Fontsize");
167 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{stat_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub { 195
196 $table->add (1, $row++, new CFClient::UI::Slider
197 range => [$CFG->{stat_fontsize}, 0.5, 2, 0.1],
198 tooltip => "The font size used by the statistics window only",
199 connect_changed => sub {
168 $CFG->{stat_fontsize} = 0.1 * int $_[1] * 10; 200 $CFG->{stat_fontsize} = 0.1 * int $_[1] * 10;
169 &set_stats_window_fontsize; 201 &set_stats_window_fontsize;
202 }
170 }); 203 );
171 204
172 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge height"); 205 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge size");
173 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02], connect_changed => sub { 206 $table->add (1, $row++, new CFClient::UI::Slider
207 range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02],
208 tooltip => "Adjust the size of the stats gauges at the bottom right",
209 connect_changed => sub {
174 $CFG->{gauge_size} = $_[1]; 210 $CFG->{gauge_size} = $_[1];
175 my $h = int ($HEIGHT * $CFG->{gauge_size}); 211 my $h = int $HEIGHT * $CFG->{gauge_size};
176 $GAUGES->{win}->set_size ($WIDTH, $h); 212 $GAUGES->{win}->set_size ($WIDTH, $h);
177 $GAUGES->{win}->{y} = $HEIGHT - $h; 213 $GAUGES->{win}->move (0, $HEIGHT - $h);
178 $GAUGES->{win}->{x} = 0; 214 }
179 $GAUGES->{win}->update;
180 }); 215 );
181
182 216
183 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize"); 217 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize");
184 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gauge_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub { 218 $table->add (1, $row++, new CFClient::UI::Slider
219 range => [$CFG->{gauge_fontsize}, 0.5, 2.0, 0.1],
220 tooltip => "Adjusts the fontsize of the gauges at the bottom right",
221 connect_changed => sub {
185 $CFG->{gauge_fontsize} = 0.1 * int $_[1] * 10; 222 $CFG->{gauge_fontsize} = 0.1 * int $_[1] * 10;
186 &set_gauge_window_fontsize; 223 &set_gauge_window_fontsize;
187 $GAUGES->{win}->check_size; 224 #$GAUGES->{win}->check_size;
188 $GAUGES->{win}->update; 225 #$GAUGES->{win}->update;
226 }
189 }); 227 );
190 228
191 229 $table->add (1, $row++, new CFClient::UI::Button
192 230 expand => 1, align => 0, text => "Apply",
193 $table->add (1, $row++, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub { 231 tooltip => "Apply the video settings (unless they are auto-apply)",
232 connect_activate => sub {
194 video_shutdown (); 233 video_shutdown ();
195 video_init (); 234 video_init ();
235 }
196 }); 236 );
197 237
198 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Audio Enable"); 238 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Audio Enable");
199 $table->add (1, $row++, new CFClient::UI::CheckBox state => $CFG->{audio_enable}, connect_changed => sub { 239 $table->add (1, $row++, new CFClient::UI::CheckBox
240 state => $CFG->{audio_enable},
241 tooltip => "If enabled, sound effects and music will be played. If disabled, no audio will be used and the soundcard will not be opened.",
242 connect_changed => sub {
200 $CFG->{audio_enable} = $_[1]; 243 $CFG->{audio_enable} = $_[1];
244 }
201 }); 245 );
202# $table->add (0, 9, new CFClient::UI::Label valign => 0, align => 1, text => "Effects Volume"); 246# $table->add (0, 9, new CFClient::UI::Label valign => 0, align => 1, text => "Effects Volume");
203# $table->add (1, 8, new CFClient::UI::Slider range => [$CFG->{effects_volume}, 0, 128, 1], connect_changed => sub { 247# $table->add (1, 8, new CFClient::UI::Slider range => [$CFG->{effects_volume}, 0, 128, 1], connect_changed => sub {
204# $CFG->{effects_volume} = $_[1]; 248# $CFG->{effects_volume} = $_[1];
205# }); 249# });
206 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Background Music"); 250 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Background Music");
207 $table->add (1, $row++, my $hbox = new CFClient::UI::HBox); 251 $table->add (1, $row++, my $hbox = new CFClient::UI::HBox);
208 $hbox->add (new CFClient::UI::CheckBox expand => 1, state => $CFG->{bgm_enable}, connect_changed => sub { 252 $hbox->add (new CFClient::UI::CheckBox
253 expand => 1, state => $CFG->{bgm_enable},
254 tooltip => "Enable background music playing",
255 connect_changed => sub {
209 $CFG->{bgm_enable} = $_[1]; 256 $CFG->{bgm_enable} = $_[1];
257 }
210 }); 258 );
211 $hbox->add (new CFClient::UI::Slider expand => 1, range => [$CFG->{bgm_volume}, 0, 1, 0.1], connect_changed => sub { 259 $hbox->add (new CFClient::UI::Slider
260 expand => 1, range => [$CFG->{bgm_volume}, 0, 1, 0.1],
261 tooltip => "The volume of the background music",
262 connect_changed => sub {
212 $CFG->{bgm_volume} = $_[1]; 263 $CFG->{bgm_volume} = $_[1];
213 CFClient::MixMusic::volume $_[1] * 128; 264 CFClient::MixMusic::volume $_[1] * 128;
265 }
214 }); 266 );
215 267
216 $table->add (1, $row++, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub { 268 $table->add (1, $row++, new CFClient::UI::Button
269 expand => 1, align => 0, text => "Apply",
270 tooltip => "Apply the audio settings that are not auto-apply",
271 connect_activate => sub {
217 audio_shutdown (); 272 audio_shutdown ();
218 audio_init (); 273 audio_init ();
274 }
219 }); 275 );
220 276
221 $dialog 277 $dialog
222} 278}
223 279
224sub set_stats_window_fontsize { 280sub set_stats_window_fontsize {
245 $vb->add (my $hbg = new CFClient::UI::HBox expand => 1); 301 $vb->add (my $hbg = new CFClient::UI::HBox expand => 1);
246 302
247 303
248 $hbg->add (new CFClient::UI::Empty expand => 1); 304 $hbg->add (new CFClient::UI::Empty expand => 1);
249 $hbg->add (my $hb = new CFClient::UI::HBox); 305 $hbg->add (my $hb = new CFClient::UI::HBox);
250 $hb->add (my $hg = new CFClient::UI::Gauge type => 'hp'); 306 $hb->add (my $hg = new CFClient::UI::Gauge type => 'hp', tooltip => "Health points");
251 $hb->add (my $mg = new CFClient::UI::Gauge type => 'mana'); 307 $hb->add (my $mg = new CFClient::UI::Gauge type => 'mana', tooltip => "Spellpoints");
252 $hb->add (my $gg = new CFClient::UI::Gauge type => 'grace'); 308 $hb->add (my $gg = new CFClient::UI::Gauge type => 'grace', tooltip => "Grace");
253 $hb->add (my $fg = new CFClient::UI::Gauge type => 'food'); 309 $hb->add (my $fg = new CFClient::UI::Gauge type => 'food', tooltip => "Food");
254 310
255 $vb->add (my $exp = new CFClient::UI::Label valign => 0, align => 1, text => "XP:"); 311 $vb->add (my $exp = new CFClient::UI::Label valign => 0, align => 1, text => "XP: 0 LVL: 0");
256# $vb->add (my $lvl = new CFClient::UI::Label valign => 0, align => 1, text => "Lvl:");
257 $vb->add (my $rng = new CFClient::UI::Label valign => 0, align => 1, text => "Rng:"); 312 $vb->add (my $rng = new CFClient::UI::Label valign => 0, align => 1, text => "Rng:");
258 313
259
260 $GAUGES = { 314 $GAUGES = {
261 exp => $exp,# lvl => $lvl,
262 win => $win, range => $rng, 315 exp => $exp, win => $win, range => $rng,
263 food => $fg, mana => $mg, hp => $hg, grace => $gg 316 food => $fg, mana => $mg, hp => $hg, grace => $gg
264 }; 317 };
265 $win 318 $win
266} 319}
267 320
310 $hb->add (my $tbl2 = new CFClient::UI::Table expand => 1); 363 $hb->add (my $tbl2 = new CFClient::UI::Table expand => 1);
311 364
312 my $row = 0; 365 my $row = 0;
313 my $col = 0; 366 my $col = 0;
314 367
368 my %resist_names = (
369 slow => "Slow",
370 holyw => "Holy Word",
371 conf => "Confusion",
372 fire => "Fire",
373 depl => "Depletion",
374 magic => "Magic",
375 drain => "Draining",
376 acid => "Acid",
377 pois => "Poison",
378 para => "Paralysation",
379 deat => "Death",
380 phys => "Physical",
381 blind => "Blind",
382 fear => "Fear",
383 tund => "Turn undead",
384 elec => "Electricity",
385 cold => "Cold",
386 ghit => "Ghost hit",
387 );
315 for (qw/slow holyw conf fire depl magic 388 for (qw/slow holyw conf fire depl magic
316 drain acid pois para deat phys 389 drain acid pois para deat phys
317 blind fear tund elec cold ghit/) 390 blind fear tund elec cold ghit/)
318 { 391 {
319 $tbl2->add ($col , $row, 392 $tbl2->add ($col, $row,
320 $STATWIDS->{"res_$_"} = 393 $STATWIDS->{"res_$_"} =
321 new CFClient::UI::Label text => "0", align => +1, valign => 0 394 new CFClient::UI::Label text => "0", align => +1, valign => 0
322 ); 395 );
323 $tbl2->add ($col + 1, $row, new CFClient::UI::Image image => "ui/resist/resist_$_.png"); 396 $tbl2->add ($col + 1, $row, new CFClient::UI::Image can_hover => 1, can_events => 1, image => "ui/resist/resist_$_.png", tooltip => $resist_names{$_});
324 397
325 $row++; 398 $row++;
326 if ($row % 6 == 0) { 399 if ($row % 6 == 0) {
327 $col += 2; 400 $col += 2;
328 $row = 0; 401 $row = 0;
355 $GAUGES->{exp} ->set_text ("XP: " . ($stats->{11} || $stats->{28}) * 1 428 $GAUGES->{exp} ->set_text ("XP: " . ($stats->{11} || $stats->{28}) * 1
356 ." LVL: " . $stats->{12} * 1); 429 ." LVL: " . $stats->{12} * 1);
357 my $rng = $stats->{20}; 430 my $rng = $stats->{20};
358 $rng =~ s/^Range: //; # thank you so much dear server 431 $rng =~ s/^Range: //; # thank you so much dear server
359 $GAUGES->{range} ->set_text ("Rng: " . $rng); 432 $GAUGES->{range} ->set_text ("Rng: " . $rng);
360# $GAUGES->{lvl} ->set_text ("LVL: " . $stats->{12}); 433 my $title = $stats->{21};
434 $title =~ s/^Player: //;
361 $STATWIDS->{title} ->set_text ("Title: " . $stats->{21}); 435 $STATWIDS->{title} ->set_text ("Title: " . $title);
362 436
363 if (0) { # this code can vanish, just wanted to preserver it for a checkin
364 $STATWIDS->{st_str} ->set_text (sprintf "S%d", $stats->{5});
365 $STATWIDS->{st_dex} ->set_text (sprintf "D%d", $stats->{8});
366 $STATWIDS->{st_con} ->set_text (sprintf "Co%d", $stats->{9});
367 $STATWIDS->{st_int} ->set_text (sprintf "I%d", $stats->{6});
368 $STATWIDS->{st_wis} ->set_text (sprintf "W%d", $stats->{7});
369 $STATWIDS->{st_pow} ->set_text (sprintf "P%d", $stats->{22});
370 $STATWIDS->{st_cha} ->set_text (sprintf "Ch%d", $stats->{10});
371 $STATWIDS->{st_wc} ->set_text (sprintf "Wc%d", $stats->{13});
372 $STATWIDS->{st_ac} ->set_text (sprintf "Ac%d", $stats->{14});
373 $STATWIDS->{st_dam} ->set_text (sprintf "Dam%d", $stats->{15});
374 $STATWIDS->{st_arm} ->set_text (sprintf "Arm%d", $stats->{16});
375 $STATWIDS->{st_spd} ->set_text (sprintf "Sp%.1f", $stats->{17});
376 $STATWIDS->{st_wspd}->set_text (sprintf "WSp%.1f", $stats->{19});
377 } else {
378 $STATWIDS->{st_str} ->set_text (sprintf "%d", $stats->{5}); 437 $STATWIDS->{st_str} ->set_text (sprintf "%d", $stats->{5});
379 $STATWIDS->{st_dex} ->set_text (sprintf "%d", $stats->{8}); 438 $STATWIDS->{st_dex} ->set_text (sprintf "%d", $stats->{8});
380 $STATWIDS->{st_con} ->set_text (sprintf "%d", $stats->{9}); 439 $STATWIDS->{st_con} ->set_text (sprintf "%d", $stats->{9});
381 $STATWIDS->{st_int} ->set_text (sprintf "%d", $stats->{6}); 440 $STATWIDS->{st_int} ->set_text (sprintf "%d", $stats->{6});
382 $STATWIDS->{st_wis} ->set_text (sprintf "%d", $stats->{7}); 441 $STATWIDS->{st_wis} ->set_text (sprintf "%d", $stats->{7});
383 $STATWIDS->{st_pow} ->set_text (sprintf "%d", $stats->{22}); 442 $STATWIDS->{st_pow} ->set_text (sprintf "%d", $stats->{22});
384 $STATWIDS->{st_cha} ->set_text (sprintf "%d", $stats->{10}); 443 $STATWIDS->{st_cha} ->set_text (sprintf "%d", $stats->{10});
385 $STATWIDS->{st_wc} ->set_text (sprintf "%d", $stats->{13}); 444 $STATWIDS->{st_wc} ->set_text (sprintf "%d", $stats->{13});
386 $STATWIDS->{st_ac} ->set_text (sprintf "%d", $stats->{14}); 445 $STATWIDS->{st_ac} ->set_text (sprintf "%d", $stats->{14});
387 $STATWIDS->{st_dam} ->set_text (sprintf "%d", $stats->{15}); 446 $STATWIDS->{st_dam} ->set_text (sprintf "%d", $stats->{15});
388 $STATWIDS->{st_arm} ->set_text (sprintf "%d", $stats->{16}); 447 $STATWIDS->{st_arm} ->set_text (sprintf "%d", $stats->{16});
389 $STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{17}); 448 $STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{17});
390 $STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{19}); 449 $STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{19});
391 }
392 450
393 my %tbl = ( 451 my %tbl = (
394 phys => 100, 452 phys => 100,
395 magic => 101, 453 magic => 101,
396 fire => 102, 454 fire => 102,
403 pois => 109, 461 pois => 109,
404 slow => 110, 462 slow => 110,
405 para => 111, 463 para => 111,
406 tund => 112, 464 tund => 112,
407 fear => 113, 465 fear => 113,
466 depl => 113,
408 deat => 115, 467 deat => 115,
409 holyw => 116, 468 holyw => 116,
410 blind => 117 469 blind => 117
411 ); 470 );
412 471
501 $table->add (0, 2, new CFClient::UI::Label valign => 0, align => 1, text => "Host:Port"); 560 $table->add (0, 2, new CFClient::UI::Label valign => 0, align => 1, text => "Host:Port");
502 561
503 { 562 {
504 $table->add (1, 2, my $vbox = new CFClient::UI::VBox); 563 $table->add (1, 2, my $vbox = new CFClient::UI::VBox);
505 564
506 $vbox->add (my $HOST = new CFClient::UI::Entry expand => 1, text => $CFG->{host}, connect_changed => sub { 565 $vbox->add (
566 my $HOST = new CFClient::UI::Entry
567 expand => 1,
568 text => $CFG->{host},
569 tooltip => "The hostname or ip address of the Crossfire(+) server to connect to",
570 connect_changed => sub {
571 my ($self, $value) = @_;
572 $CFG->{host} = $value;
573 }
574 );
575
576 $METASERVER = metaserver_dialog;
577
578 $vbox->add (new CFClient::UI::Flopper
579 expand => 1,
580 text => "Metaserver",
581 other => $METASERVER,
582 tooltip => "Show a list of aviable crossfire servers",
583 connect_open => sub {
584 update_metaserver $HOST;
585 }
586 );
587 }
588
589 $table->add (0, 4, new CFClient::UI::Label valign => 0, align => 1, text => "Username");
590 $table->add (1, 4, new CFClient::UI::Entry
591 text => $CFG->{user},
592 tooltip => "The name of your character on the server",
593 connect_changed => sub {
507 my ($self, $value) = @_; 594 my ($self, $value) = @_;
508 $CFG->{host} = $value;
509 });
510
511 $METASERVER = metaserver_dialog;
512
513 $vbox->add (new CFClient::UI::Flopper expand => 1, text => "Metaserver", other => $METASERVER, connect_open => sub {
514 update_metaserver $HOST;
515 });
516 }
517
518 $table->add (0, 4, new CFClient::UI::Label valign => 0, align => 1, text => "Username");
519 $table->add (1, 4, new CFClient::UI::Entry text => $CFG->{user}, connect_changed => sub {
520 my ($self, $value) = @_;
521 $CFG->{user} = $value; 595 $CFG->{user} = $value;
596 }
522 }); 597 );
523 598
524 $table->add (0, 5, new CFClient::UI::Label valign => 0, align => 1, text => "Password"); 599 $table->add (0, 5, new CFClient::UI::Label valign => 0, align => 1, text => "Password");
525 $table->add (1, 5, new CFClient::UI::Entry text => $CFG->{password}, hidden => 1, connect_changed => sub { 600 $table->add (1, 5, new CFClient::UI::Entry
601 text => $CFG->{password},
602 hidden => 1,
603 tooltip => "The password for your character",
604 connect_changed => sub {
526 my ($self, $value) = @_; 605 my ($self, $value) = @_;
527 $CFG->{password} = $value; 606 $CFG->{password} = $value;
607 }
528 }); 608 );
529 609
530 $table->add (0, 6, new CFClient::UI::Label valign => 0, align => 1, text => "Def. say cmd"); 610 $table->add (0, 6, new CFClient::UI::Label valign => 0, align => 1, text => "Def. say cmd");
531 $table->add (1, 6, my $saycmd = new CFClient::UI::Entry text => $CFG->{say_command}, connect_changed => sub { 611 $table->add (1, 6, my $saycmd = new CFClient::UI::Entry
612 text => $CFG->{say_command},
613 tooltip => "This is the command that will be used if you write a line in the message window entry. "
614 ."Usually you want to enter something like 'say' or 'shout' or 'gsay' here. "
615 ."But you could also set it to 'tell <playername>' to only chat with that user.",
616 connect_changed => sub {
532 my ($self, $value) = @_; 617 my ($self, $value) = @_;
533 $CFG->{say_command} = $value; 618 $CFG->{say_command} = $value;
619 }
534 }); 620 );
535 621
536 $table->add (0, 7, new CFClient::UI::Label valign => 0, align => 1, text => "Map Size"); 622 $table->add (0, 7, new CFClient::UI::Label valign => 0, align => 1, text => "Map Size");
537 $table->add (1, 7, new CFClient::UI::Slider 623 $table->add (1, 7, new CFClient::UI::Slider
538 req_w => 100, 624 req_w => 100,
539 range => [$CFG->{mapsize}, 10, 100 + 1, 1], 625 range => [$CFG->{mapsize}, 10, 100 + 1, 1],
626 tooltip => "This is the size of the portion of the map update the server sends you. "
627 ."If you set this to a high value you will be able to see further for example.",
540 connect_changed => sub { 628 connect_changed => sub {
541 my ($self, $value) = @_; 629 my ($self, $value) = @_;
542 630
543 $CFG->{mapsize} = $self->{range}[0] = $value = int $value; 631 $CFG->{mapsize} = $self->{range}[0] = $value = int $value;
544 }, 632 },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines