… | |
… | |
3 | use utf8; |
3 | use utf8; |
4 | use strict; |
4 | use strict; |
5 | |
5 | |
6 | use Crossfire::Protocol::Constants; |
6 | use Crossfire::Protocol::Constants; |
7 | |
7 | |
|
|
8 | use CFClient; |
8 | use CFClient::UI; |
9 | use CFClient::UI; |
9 | |
10 | |
10 | use base 'Crossfire::Protocol::Base'; |
11 | use base 'Crossfire::Protocol::Base'; |
11 | |
12 | |
12 | sub new { |
13 | sub new { |
… | |
… | |
14 | |
15 | |
15 | my $self = $class->SUPER::new (@_); |
16 | my $self = $class->SUPER::new (@_); |
16 | |
17 | |
17 | $self->{map_widget}->clr_commands; |
18 | $self->{map_widget}->clr_commands; |
18 | |
19 | |
19 | my $parser = new Pod::POM; |
|
|
20 | my $pod = $parser->parse_file (CFClient::find_rcfile "pod/command_help.pod"); |
20 | my $pod = CFClient::load_pod CFClient::find_rcfile "pod/command_help.pod"; |
21 | |
21 | |
22 | for my $head2 ($pod->head1->[-2]->head2) { |
22 | for my $head2 ($pod->head1->[-2]->head2) { |
23 | $head2->title =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x |
23 | $head2->title =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x |
24 | or next; |
24 | or next; |
25 | |
25 | |
… | |
… | |
459 | } |
459 | } |
460 | |
460 | |
461 | sub addme_success { |
461 | sub addme_success { |
462 | my ($self) = @_; |
462 | my ($self) = @_; |
463 | |
463 | |
464 | my $parser = new Pod::POM; |
464 | my $pod = CFClient::load_pod CFClient::find_rcfile "pod/skill_help.pod"; |
465 | my $pod = $parser->parse_file (CFClient::find_rcfile "pod/skill_help.pod"); |
|
|
466 | |
465 | |
467 | my %skill_tooltip; |
466 | my %skill_tooltip; |
468 | |
467 | |
469 | for my $head2 ($pod->head1->[-2]->head2) { |
468 | for my $head2 ($pod->head1->[-2]->head2) { |
470 | $skill_tooltip{$head2->title} = CFClient::pod_to_pango $head2->content; |
469 | $skill_tooltip{$head2->title} = CFClient::pod_to_pango $head2->content; |