--- deliantra/Deliantra-Client/DC/Protocol.pm 2006/05/27 20:46:54 1.7 +++ deliantra/Deliantra-Client/DC/Protocol.pm 2006/05/29 19:30:28 1.9 @@ -68,10 +68,25 @@ sub user_send { my ($self, $command) = @_; + if ($self->{record}) { + push @{$self->{record}}, $command; + } + $self->send_command ($command); ::status $command; } +sub start_record { + my ($self) = @_; + + $self->{record} = []; +} + +sub stop_record { + my ($self) = @_; + return delete $self->{record}; +} + sub map_scroll { my ($self, $dx, $dy) = @_; @@ -327,7 +342,12 @@ my $dialog = new CFClient::UI::FancyFrame title => "Query", - child => my $vbox = new CFClient::UI::VBox; + child => my $vbox = new CFClient::UI::VBox, + on_visibility_change => sub { + my ($self, $visible) = @_; + $self->center if $visible; + }, + ; $vbox->add (new CFClient::UI::Label max_w => $::WIDTH * 0.4, @@ -379,7 +399,7 @@ $entry->focus_in; } - $dialog->show_centered; + $dialog->show; } sub drawinfo {