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.80 by root, Wed Apr 12 00:36:13 2006 UTC vs.
Revision 1.81 by root, Wed Apr 12 00:40:45 2006 UTC

941 941
942 $self->{text} = $text; 942 $self->{text} = $text;
943 $self->{layout}->set_markup ($text); 943 $self->{layout}->set_markup ($text);
944 944
945 delete $self->{texture}; 945 delete $self->{texture};
946# $self->{w} = $self->{h} = -1;
946 $self->update; 947 $self->update;
947} 948}
948 949
949sub get_text { 950sub get_text {
950 my ($self, $text) = @_; 951 my ($self, $text) = @_;
983sub _draw { 984sub _draw {
984 my ($self) = @_; 985 my ($self) = @_;
985 986
986 my $tex = $self->{texture} ||= do { 987 my $tex = $self->{texture} ||= do {
987 $self->{layout}->set_width ($self->{w}); 988 $self->{layout}->set_width ($self->{w});
988 $self->{layout}->set_height (List::Util::min $self->{h}, $self->{height}); 989 $self->{layout}->set_height (List::Util::min $self->{h} - $self->{padding} * 2, $self->{height});
989 new_from_layout CFClient::Texture $self->{layout} 990 new_from_layout CFClient::Texture $self->{layout}
990 }; 991 };
991 992
992 glEnable GL_BLEND; 993 glEnable GL_BLEND;
993 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; 994 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines