--- deliantra/Deliantra-Client/DC/Protocol.pm 2006/06/01 18:56:05 1.15 +++ deliantra/Deliantra-Client/DC/Protocol.pm 2006/06/05 05:31:13 1.20 @@ -5,6 +5,7 @@ use Crossfire::Protocol::Constants; +use CFClient; use CFClient::UI; use base 'Crossfire::Protocol::Base'; @@ -16,8 +17,7 @@ $self->{map_widget}->clr_commands; - my $parser = new Pod::POM; - my $pod = $parser->parse_file (CFClient::find_rcfile "pod/command_help.pod"); + my $pod = CFClient::load_pod CFClient::find_rcfile "pod/command_help.pod"; for my $head2 ($pod->head1->[-2]->head2) { $head2->title =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x @@ -431,7 +431,7 @@ $self->{statusbox}->add ($text, group => $text, fg => $color[$color], - timeout => 10, + timeout => $color >= 2 ? 60 : 10, tooltip_font => $::FONT_FIXED, ); } @@ -447,7 +447,7 @@ # TODO # create a widget dynamically, using spell face (CF::Protocol downloads them) - $::SPELL_LIST->add_spell ($spell); + $::SETUP_SPELLS->add_spell ($spell); $self->{map_widget}->add_command ("invoke $spell->{name}", CFClient::UI::Label::escape $spell->{message}); $self->{map_widget}->add_command ("cast $spell->{name}", CFClient::UI::Label::escape $spell->{message}); @@ -455,14 +455,13 @@ sub spell_delete { my ($self, $spell) = @_; - $::SPELL_LIST->remove_spell ($spell); + $::SETUP_SPELLS->remove_spell ($spell); } sub addme_success { my ($self) = @_; - my $parser = new Pod::POM; - my $pod = $parser->parse_file (CFClient::find_rcfile "pod/skill_help.pod"); + my $pod = CFClient::load_pod CFClient::find_rcfile "pod/skill_help.pod"; my %skill_tooltip; @@ -511,14 +510,14 @@ $self->send ("requestinfo image_sums $face $face"); $self->{statusbox}->add (CFClient::UI::Label::escape "prefetching $todo", - group => "prefetch", timeout => 2, fg => [1, 1, 0, 0.5]); + group => "prefetch", timeout => 3, fg => [1, 1, 0, 0.5]); } elsif (!exists $self->{num_faces}) { $self->send ("requestinfo image_info"); $self->{num_faces} = 0; $self->{statusbox}->add (CFClient::UI::Label::escape "starting to prefetch", - group => "prefetch", timeout => 2, fg => [1, 1, 0, 0.5]); + group => "prefetch", timeout => 3, fg => [1, 1, 0, 0.5]); } }