--- deliantra/Deliantra-Client/DC/UI.pm 2009/01/11 23:50:27 1.477 +++ deliantra/Deliantra-Client/DC/UI.pm 2009/12/22 00:35:44 1.478 @@ -668,8 +668,8 @@ sub _draw { my ($self) = @_; - my $color = $FOCUS == $self && $self->{active_bg} - ? $self->{active_bg} + my $color = $FOCUS == $self + ? $self->{active_bg} || $self->{bg} : $self->{bg}; if ($color && (@$color < 4 || $color->[3])) { @@ -2596,7 +2596,7 @@ package DC::UI::Image; -our @ISA = DC::UI::Base::; +our @ISA = DC::UI::DrawBG::; use DC::OpenGL; @@ -2639,6 +2639,13 @@ $self->new (path => $path) } +sub set_texture { + my ($self, $tex) = @_; + + $self->{tex} = $tex; + $self->update; +} + sub size_request { my ($self) = @_; @@ -2648,6 +2655,8 @@ sub _draw { my ($self) = @_; + $self->SUPER::_draw; + my $tex = $self->{tex}; my ($w, $h) = ($self->{w}, $self->{h}); @@ -2675,8 +2684,6 @@ use DC::OpenGL; -my %textures; - sub new { my $class = shift;