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.117 by root, Sun Apr 16 07:39:51 2006 UTC vs.
Revision 1.118 by elmex, Sun Apr 16 17:43:17 2006 UTC

310 expand => 1, 310 expand => 1,
311 fontsize => $::CFG->{log_fontsize}, 311 fontsize => $::CFG->{log_fontsize},
312 ); 312 );
313 313
314 $vbox->add (my $input = new CFClient::UI::LineEntry 314 $vbox->add (my $input = new CFClient::UI::LineEntry
315 connect_focus_in => sub {
316 my ($input, $prev_focus) = @_;
317
318 delete $input->{refocus_map};
319
320 if ($prev_focus == $MAPWIDGET && $input->{auto_activated}) {
321 $input->{refocus_map} = 1;
322 }
323 delete $input->{auto_activated};
324 },
315 connect_activate => sub { 325 connect_activate => sub {
316 my ($input, $text) = @_; 326 my ($input, $text) = @_;
317 $input->set_text (''); 327 $input->set_text ('');
318 328
319 if ($text =~ /^\/(.*)/) { 329 if ($text =~ /^\/(.*)/) {
320 $::CONN->user_send ("command $1"); 330 $::CONN->user_send ("command $1");
321 } else { 331 } else {
322 my $say_cmd = $::CFG->{say_command} || 'say'; 332 my $say_cmd = $::CFG->{say_command} || 'say';
323 $::CONN->user_send ("command $say_cmd $text"); 333 $::CONN->user_send ("command $say_cmd $text");
334 }
335 if ($input->{refocus_map}) {
336 delete $input->{refocus_map};
337 $MAPWIDGET->focus_in
324 } 338 }
325 }, 339 },
326 connect_escape => sub { 340 connect_escape => sub {
327 $MAPWIDGET->focus_in 341 $MAPWIDGET->focus_in
328 }, 342 },
402 $MAPWIDGET->focus_in; 416 $MAPWIDGET->focus_in;
403 $MAPWIDGET->connect (activate_console => sub { 417 $MAPWIDGET->connect (activate_console => sub {
404 my ($mapwidget, $preset) = @_; 418 my ($mapwidget, $preset) = @_;
405 419
406 if ($CONSOLE) { 420 if ($CONSOLE) {
421 $CONSOLE->{input}->{auto_activated} = 1;
407 $CONSOLE->{input}->focus_in; 422 $CONSOLE->{input}->focus_in;
408 423
409 if ($preset && $CONSOLE->{input}->get_text eq '') { 424 if ($preset && $CONSOLE->{input}->get_text eq '') {
410 $CONSOLE->{input}->set_text ($preset); 425 $CONSOLE->{input}->set_text ($preset);
411 } 426 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines