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.7 by root, Sun Aug 13 18:48:56 2006 UTC vs.
Revision 1.8 by root, Sun Aug 13 19:47:05 2006 UTC

1package CFPlus::Pod; 1package CFPlus::Pod;
2 2
3use strict; 3use strict;
4use utf8;
4 5
5use Storable; 6use Storable;
6 7
7our $VERSION = 1; 8our $VERSION = 1;
8 9
10our $on_link = sub { };
9our %wiki; 11our %wiki;
10 12
11my $MA_BEG = "\x{fcd0}"; 13my $MA_BEG = "\x{fcd0}";
12my $MA_SEP = "\x{fcd1}"; 14my $MA_SEP = "\x{fcd1}";
13my $MA_END = "\x{fcd2}"; 15my $MA_END = "\x{fcd2}";
96 my ($par, $path) = @_; 98 my ($par, $path) = @_;
97 99
98 "<small>img</small>" 100 "<small>img</small>"
99 }, 101 },
100 link => sub { 102 link => sub {
101 my ($par, $link) = @_; 103 my ($par, $text, $link) = @_;
102 104
103 "<big>" . (CFPlus::asxml $link) . "</big>" 105 "<span foreground='#ffff00'>↺</span><span foreground='#c0c0ff' underline='single'>" . (CFPlus::asxml $text) . "</span>"
104 }, 106 },
105); 107);
106 108
107sub as_label(@) { 109sub as_label(@) {
108 thaw_section @_, %as_label; 110 thaw_section @_, %as_label;
122 image => sub { 124 image => sub {
123 my ($par, $path) = @_; 125 my ($par, $path) = @_;
124 126
125 push @{ $par->{widget} }, new CFPlus::UI::Image path => $path; 127 push @{ $par->{widget} }, new CFPlus::UI::Image path => $path;
126 128
127 "\x{FFFC}" 129 "\x{fffc}"
128 }, 130 },
129 link => sub { 131 link => sub {
130 my ($par, $link) = @_; 132 my ($par, $text, $link) = @_;
131 133
132 "<big>" . (CFPlus::asxml $link) . "</big>" 134 push @{ $par->{widget} }, new CFPlus::UI::Label
135 markup => "<span foreground='#ffff00'>↺</span><span foreground='#c0c0ff' underline='single'>" . (CFPlus::asxml $text) . "</span>",
136 size => 0.8,
137 can_hover => 1,
138 can_events => 1,
139 padding_x => 0,
140 padding_y => 0,
141 on_button_up => sub {
142 $on_link->(split /\//, $link);
143 };
144
145 "\x{fffc}"
133 }, 146 },
134); 147);
135 148
136sub as_paragraphs(@) { 149sub as_paragraphs(@) {
137 thaw_section @_, %as_paragraphs; 150 thaw_section @_, %as_paragraphs;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines