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.122 by root, Mon Apr 17 19:21:00 2006 UTC vs.
Revision 1.124 by root, Mon Apr 17 19:50:23 2006 UTC

300 300
301sub message_window { 301sub message_window {
302 my $window = new CFClient::UI::FancyFrame 302 my $window = new CFClient::UI::FancyFrame
303 border_bg => [1, 1, 1, 0.5], 303 border_bg => [1, 1, 1, 0.5],
304 bg => [0.3, 0.3, 0.3, 0.8], 304 bg => [0.3, 0.3, 0.3, 0.8],
305 user_w => $::WIDTH/4, 305 user_w => int $::WIDTH / 3,
306 user_h => $::HEIGHT, 306 user_h => int $::HEIGHT / 5,
307 child => (my $vbox = new CFClient::UI::VBox); 307 child => (my $vbox = new CFClient::UI::VBox);
308 308
309 $vbox->add ($LOGVIEW = new CFClient::UI::TextView 309 $vbox->add ($LOGVIEW = new CFClient::UI::TextView
310 expand => 1, 310 expand => 1,
311 fontsize => $::CFG->{log_fontsize}, 311 fontsize => $::CFG->{log_fontsize},
325 connect_activate => sub { 325 connect_activate => sub {
326 my ($input, $text) = @_; 326 my ($input, $text) = @_;
327 $input->set_text (''); 327 $input->set_text ('');
328 328
329 if ($text =~ /^\/(.*)/) { 329 if ($text =~ /^\/(.*)/) {
330 $::CONN->user_send ("command $1"); 330 $::CONN->user_send ($1);
331 } else { 331 } else {
332 my $say_cmd = $::CFG->{say_command} || 'say'; 332 my $say_cmd = $::CFG->{say_command} || 'say';
333 $::CONN->user_send ("command $say_cmd $text"); 333 $::CONN->user_send ("$say_cmd $text");
334 } 334 }
335 if ($input->{refocus_map}) { 335 if ($input->{refocus_map}) {
336 delete $input->{refocus_map}; 336 delete $input->{refocus_map};
337 $MAPWIDGET->focus_in 337 $MAPWIDGET->focus_in
338 } 338 }
404 padding => 0, 404 padding => 0,
405 y => $HEIGHT * 44 / 45 - $FONTSIZE; 405 y => $HEIGHT * 44 / 45 - $FONTSIZE;
406 $CFClient::UI::ROOT->add ($STATUS_LINE); 406 $CFClient::UI::ROOT->add ($STATUS_LINE);
407 407
408 $ALT_ENTER_MESSAGE = new CFClient::UI::Label 408 $ALT_ENTER_MESSAGE = new CFClient::UI::Label
409 padding => 0, 409 padding => 0,
410 y => $HEIGHT * 44 / 45, 410 y => $HEIGHT * 44 / 45,
411 height => $HEIGHT / 45, 411 fontsize => $HEIGHT / 45,
412 text => "Use <b>Alt-Enter</b> to toggle fullscreen mode"; 412 markup => "Use <b>Alt-Enter</b> to toggle fullscreen mode";
413 $CFClient::UI::ROOT->add ($ALT_ENTER_MESSAGE); 413 $CFClient::UI::ROOT->add ($ALT_ENTER_MESSAGE);
414 414
415 $CFClient::UI::ROOT->add ($MAPWIDGET = new CFClient::UI::MapWidget); 415 $CFClient::UI::ROOT->add ($MAPWIDGET = new CFClient::UI::MapWidget);
416 $MAPWIDGET->focus_in; 416 $MAPWIDGET->focus_in;
417 $MAPWIDGET->connect (activate_console => sub { 417 $MAPWIDGET->connect (activate_console => sub {
505@conn::ISA = Crossfire::Protocol::; 505@conn::ISA = Crossfire::Protocol::;
506 506
507sub conn::user_send { 507sub conn::user_send {
508 my ($self, $command) = @_; 508 my ($self, $command) = @_;
509 509
510 $self->send ($command); 510 $self->send_command ($command);
511 status $command; 511 status $command;
512} 512}
513 513
514sub conn::map_scroll { 514sub conn::map_scroll {
515 my ($self, $dx, $dy) = @_; 515 my ($self, $dx, $dy) = @_;
585 return if $mode ne "spatial"; 585 return if $mode ne "spatial";
586 586
587 $x += $MAP->ox; 587 $x += $MAP->ox;
588 $y += $MAP->oy; 588 $y += $MAP->oy;
589 589
590 $self->load_map ($hash, $x, $y); 590 $self->load_map ($hash, $x, $y)
591 unless $self->{neigh}{$hash}[5]++;#d#
591 592
592 $neigh->[$tile] = [$x, $y, $w, $h]; 593 $neigh->[$tile] = [$x, $y, $w, $h];
593 594
594 $self->flood_fill ("$path$tile", $hash, $flags, $x0, $y0, $x1, $y1) 595 $self->flood_fill ("$path$tile", $hash, $flags, $x0, $y0, $x1, $y1)
595 if $x >= $x0 && $x + $w < $x1 && $y >= $y0 && $y + $h < $y1; 596 if $x >= $x0 && $x + $w < $x1 && $y >= $y0 && $y + $h < $y1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines