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

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.333 by root, Sun Jul 23 11:09:58 2006 UTC vs.
Revision 1.334 by root, Sun Jul 23 16:11:12 2006 UTC

1635 } 1635 }
1636 1636
1637 $self 1637 $self
1638} 1638}
1639 1639
1640sub escape($) {
1641 local $_ = $_[0];
1642
1643 s/&/&/g;
1644 s/>/>/g;
1645 s/</&lt;/g;
1646
1647 $_
1648}
1649
1650sub update { 1640sub update {
1651 my ($self) = @_; 1641 my ($self) = @_;
1652 1642
1653 delete $self->{texture}; 1643 delete $self->{texture};
1654 $self->SUPER::update; 1644 $self->SUPER::update;
2203 $self->{aspect} ||= $self->{tex}{w} / $self->{tex}{h}; 2193 $self->{aspect} ||= $self->{tex}{w} / $self->{tex}{h};
2204 2194
2205 $self 2195 $self
2206} 2196}
2207 2197
2198sub STORABLE_freeze {
2199 my ($self, $cloning) = @_;
2200
2201 warn "freeze<$self>\n";#d#
2202
2203 $self->{path}
2204 or die "cannot serialise CFClient::UI::Image on non-loadable images\n";
2205
2206 $self->{path}
2207}
2208
2209sub STORABLE_attach {
2210 my ($self, $cloning, $path) = @_;
2211 warn "attach<@_>\n";#d#
2212
2213 $self->new (path => $path)
2214}
2215
2208sub size_request { 2216sub size_request {
2209 my ($self) = @_; 2217 my ($self) = @_;
2210 2218
2211 ($self->{tex}{w}, $self->{tex}{h}) 2219 ($self->{tex}{w}, $self->{tex}{h})
2212} 2220}
2226 } 2234 }
2227 2235
2228 glEnable GL_TEXTURE_2D; 2236 glEnable GL_TEXTURE_2D;
2229 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; 2237 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE;
2230 2238
2231 $tex->draw_quad_alpha (0, 0, $w, $h); 2239 $tex->draw_quad (0, 0, $w, $h);
2232 2240
2233 glDisable GL_TEXTURE_2D; 2241 glDisable GL_TEXTURE_2D;
2234} 2242}
2235 2243
2236############################################################################# 2244#############################################################################

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines