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

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.7 by root, Sat May 27 20:46:54 2006 UTC vs.
Revision 1.9 by elmex, Mon May 29 19:30:28 2006 UTC

66} 66}
67 67
68sub user_send { 68sub user_send {
69 my ($self, $command) = @_; 69 my ($self, $command) = @_;
70 70
71 if ($self->{record}) {
72 push @{$self->{record}}, $command;
73 }
74
71 $self->send_command ($command); 75 $self->send_command ($command);
72 ::status $command; 76 ::status $command;
77}
78
79sub start_record {
80 my ($self) = @_;
81
82 $self->{record} = [];
83}
84
85sub stop_record {
86 my ($self) = @_;
87 return delete $self->{record};
73} 88}
74 89
75sub map_scroll { 90sub map_scroll {
76 my ($self, $dx, $dy) = @_; 91 my ($self, $dx, $dy) = @_;
77 92
325 $prompt = $LAST_QUERY unless length $prompt; 340 $prompt = $LAST_QUERY unless length $prompt;
326 $LAST_QUERY = $prompt; 341 $LAST_QUERY = $prompt;
327 342
328 my $dialog = new CFClient::UI::FancyFrame 343 my $dialog = new CFClient::UI::FancyFrame
329 title => "Query", 344 title => "Query",
330 child => my $vbox = new CFClient::UI::VBox; 345 child => my $vbox = new CFClient::UI::VBox,
346 on_visibility_change => sub {
347 my ($self, $visible) = @_;
348 $self->center if $visible;
349 },
350 ;
331 351
332 $vbox->add (new CFClient::UI::Label 352 $vbox->add (new CFClient::UI::Label
333 max_w => $::WIDTH * 0.4, 353 max_w => $::WIDTH * 0.4,
334 ellipsise => 0, 354 ellipsise => 0,
335 text => $prompt); 355 text => $prompt);
377 ); 397 );
378 398
379 $entry->focus_in; 399 $entry->focus_in;
380 } 400 }
381 401
382 $dialog->show_centered; 402 $dialog->show;
383} 403}
384 404
385sub drawinfo { 405sub drawinfo {
386 my ($self, $color, $text) = @_; 406 my ($self, $color, $text) = @_;
387 407

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines