ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/MapWidget.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.76 by elmex, Sat Jul 22 12:36:17 2006 UTC vs.
Revision 1.77 by root, Sun Jul 23 02:44:05 2006 UTC

30 @_ 30 @_
31 ); 31 );
32 32
33 $self->{completer} = new CFClient::MapWidget::Command:: 33 $self->{completer} = new CFClient::MapWidget::Command::
34 command => $self->{command}, 34 command => $self->{command},
35 can_focus => 1,
36 tooltip => "<b>The Command Completer</b>\n\n" 35 tooltip => "<b>The Command Completer</b>\n\n"
37 . "This is your central interface to send text commands to the server. " 36 . "This is your central interface to send text commands to the server. "
38 . "To enter a verbatim command to send to the server, just type the command, " 37 . "To enter a verbatim command to send to the server, just type the command, "
39 . "followed by a space, and press return. " 38 . "followed by a space, and press return. "
40 . "Typing the initial letters of words (or just any letters) displays guesses " 39 . "Typing the initial letters of words (or just any letters) displays guesses "
244 $::CONN->user_send ("run $DIR{$sym}[0]"); 243 $::CONN->user_send ("run $DIR{$sym}[0]");
245 } else { 244 } else {
246 $::CONN->user_send ("$DIR{$sym}[1]"); 245 $::CONN->user_send ("$DIR{$sym}[1]");
247 } 246 }
248 } elsif ((ord 'a') <= $uni && $uni <= (ord 'z')) { 247 } elsif ((ord 'a') <= $uni && $uni <= (ord 'z')) {
249 $self->{completer}->invoke_key_down ($ev); 248 $self->{completer}->inject_key_down ($ev);
250 $self->{completer}->show; 249 $self->{completer}->show;
251 } else { 250 } else {
252 return 0; 251 return 0;
253 } 252 }
254 253
625 624
626 $self->SUPER::hide; 625 $self->SUPER::hide;
627 $self->{entry}->set_text (""); 626 $self->{entry}->set_text ("");
628} 627}
629 628
630sub invoke_key_down { 629sub inject_key_down {
631 my ($self, $ev) = @_; 630 my ($self, $ev) = @_;
632 631
632 $self->{entry}->grab_focus;
633 $self->{entry}->emit (key_down => $ev) 633 $self->{entry}->emit (key_down => $ev);
634} 634}
635 635
636sub update_labels { 636sub update_labels {
637 my ($self) = @_; 637 my ($self) = @_;
638 638

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines