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.326 by root, Sun Jul 16 20:04:08 2006 UTC vs.
Revision 1.327 by root, Mon Jul 17 01:41:53 2006 UTC

2118 my $self = $class->SUPER::new ( 2118 my $self = $class->SUPER::new (
2119 can_events => 0, 2119 can_events => 0,
2120 @_, 2120 @_,
2121 ); 2121 );
2122 2122
2123 $self->{path} 2123 $self->{path} || $self->{tex}
2124 or Carp::croak "required attribute 'path' not set"; 2124 or Carp::croak "'path' or 'tex' attributes required";
2125 2125
2126 $self->{tex} = $texture_cache{$self->{path}} ||= 2126 $self->{tex} ||= $texture_cache{$self->{path}} ||=
2127 new_from_file CFClient::Texture CFClient::find_rcfile $self->{path}, mipmap => 1; 2127 new_from_file CFClient::Texture CFClient::find_rcfile $self->{path}, mipmap => 1;
2128 2128
2129 Scalar::Util::weaken $texture_cache{$self->{path}}; 2129 Scalar::Util::weaken $texture_cache{$self->{path}};
2130 2130
2131 $self->{aspect} ||= $self->{tex}{w} / $self->{tex}{h}; 2131 $self->{aspect} ||= $self->{tex}{w} / $self->{tex}{h};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines