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

Comparing deliantra/Deliantra-Client/DC/Pod.pm (file contents):
Revision 1.20 by root, Sun Mar 30 00:25:11 2008 UTC vs.
Revision 1.22 by root, Sun Mar 30 11:31:09 2008 UTC

45 my $kw = lc pop @path; 45 my $kw = lc pop @path;
46 46
47 $node = $node->[N_PARENT] 47 $node = $node->[N_PARENT]
48 or return 0; 48 or return 0;
49 49
50 #TODO: maybe get rid of lowercasing?
50 return scalar grep $_ eq $kw, @{ $node->[N_KW] }; 51 return scalar grep lc eq $kw, @{ $node->[N_KW] };
51} 52}
52 53
53sub find(@) { 54sub find(@) {
54 my (@path) = @_; 55 my (@path) = @_;
55 56
122 $_[1]{$type}($_, @arg) 123 $_[1]{$type}($_, @arg)
123 }ogex; 124 }ogex;
124 } 125 }
125} 126}
126 127
128my %as_common = (
129 h1 => sub {
130 "\n\n<span foreground='#ffff00' size='x-large'>$_[1]</span>\n"
131 },
132 h2 => sub {
133 "\n\n<span foreground='#ccccff' size='large'>$_[1]</span>\n"
134 },
135 h3 => sub {
136 "\n\n<span size='large'>$_[1]</span>\n"
137 },
138);
139
127my %as_label = ( 140my %as_label = (
141 %as_common,
128 image => sub { 142 image => sub {
129 my ($par, $path) = @_; 143 my ($par, $path) = @_;
130 144
131 "<small>img</small>" 145 "<small>img</small>"
132 }, 146 },
150 164
151 $text 165 $text
152} 166}
153 167
154my %as_paragraphs = ( 168my %as_paragraphs = (
169 %as_common,
155 image => sub { 170 image => sub {
156 my ($par, $path, $flags) = @_; 171 my ($par, $path, $flags) = @_;
157 172
158 push @{ $par->{widget} }, new DC::UI::Image path => $path, 173 push @{ $par->{widget} }, new DC::UI::Image path => $path,
159 $flags & 1 ? (max_h => $::FONTSIZE) : (); 174 $flags & 1 ? (max_h => $::FONTSIZE) : ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines