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.46 by elmex, Sun Apr 9 17:39:56 2006 UTC vs.
Revision 1.47 by elmex, Sun Apr 9 18:28:23 2006 UTC

286 } 286 }
287 $ent->set_text ($value); 287 $ent->set_text ($value);
288 $ent->signal_connect (changed => sub { 288 $ent->signal_connect (changed => sub {
289 my ($ent) = @_; 289 my ($ent) = @_;
290 $cfg->{$key} = $ent->get_text; 290 $cfg->{$key} = $ent->get_text;
291 if ($key eq 'mapsize' and $cfg->{$key} > 100) {
292 $cfg->{$key} = 100;
293 $ent->set_text ('100');
294 } elsif ($key eq 'mapsize' and $cfg->{$key} < 0) {
295 $cfg->{$key} = 0;
296 $ent->set_text ('0');
297 }
291 }); 298 });
292} 299}
293 300
294sub run_config_dialog { 301sub run_config_dialog {
295 my (%events) = @_; 302 my (%events) = @_;
297 my $w = Gtk2::Window->new; 304 my $w = Gtk2::Window->new;
298 305
299 my @cfg = ( 306 my @cfg = (
300 [qw/Host host/], 307 [qw/Host host/],
301 [qw/Port port/], 308 [qw/Port port/],
309 [qw/Mapsize% mapsize/],
302 [qw/Username user/], 310 [qw/Username user/],
303 [qw/Password password/], 311 [qw/Password password/],
304 ); 312 );
305 313
306 my $cfg = {}; 314 my $cfg = {};
381Crossfire::Client::read_cfg "$Crossfire::VARDIR/pclientrc"; 389Crossfire::Client::read_cfg "$Crossfire::VARDIR/pclientrc";
382 390
383$CFG ||= { 391$CFG ||= {
384 width => 640, 392 width => 640,
385 height => 480, 393 height => 480,
394 mapsize => 100,
386 fullscreen => 0, 395 fullscreen => 0,
387 host => "crossfire.schmorp.de", 396 host => "crossfire.schmorp.de",
388 port => 13327, 397 port => 13327,
389}; 398};
390 399

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines