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.284 by root, Mon Jun 5 03:06:04 2006 UTC vs.
Revision 1.286 by root, Mon Jun 5 03:48:49 2006 UTC

18our $BUTTON_STATE; 18our $BUTTON_STATE;
19 19
20our %WIDGET; # all widgets, weak-referenced 20our %WIDGET; # all widgets, weak-referenced
21 21
22our $TOOLTIP_WATCHER = Event->idle (min => 1/60, cb => sub { 22our $TOOLTIP_WATCHER = Event->idle (min => 1/60, cb => sub {
23 return if $ENV{CFPLUS_DEBUG} & 8;
24
25 if (!$GRAB) { 23 if (!$GRAB) {
26 for (my $widget = $HOVER; $widget; $widget = $widget->{parent}) { 24 for (my $widget = $HOVER; $widget; $widget = $widget->{parent}) {
27 if (length $widget->{tooltip}) { 25 if (length $widget->{tooltip}) {
28 if ($TOOLTIP->{owner} != $widget) { 26 if ($TOOLTIP->{owner} != $widget) {
29 $TOOLTIP->hide; 27 $TOOLTIP->hide;
30 28
31 $TOOLTIP->{owner} = $widget; 29 $TOOLTIP->{owner} = $widget;
30
31 return if $ENV{CFPLUS_DEBUG} & 8;
32 32
33 my $tip = $widget->{tooltip}; 33 my $tip = $widget->{tooltip};
34 34
35 $tip = $tip->($widget) if CODE:: eq ref $tip; 35 $tip = $tip->($widget) if CODE:: eq ref $tip;
36 36
1651 }; 1651 };
1652 1652
1653 glEnable GL_TEXTURE_2D; 1653 glEnable GL_TEXTURE_2D;
1654 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; 1654 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE;
1655 1655
1656 glColor_premultiply @{$self->{fg}}
1657 if $tex->{format} == GL_ALPHA; 1656 if ($tex->{format} == GL_ALPHA) {
1658 1657 glColor @{$self->{fg}};
1658 $tex->draw_quad_alpha ($self->{ox}, $self->{oy});
1659 } else {
1659 $tex->draw_quad_alpha_premultiplied ($self->{ox}, $self->{oy}); 1660 $tex->draw_quad_alpha_premultiplied ($self->{ox}, $self->{oy});
1661 }
1660 1662
1661 glDisable GL_TEXTURE_2D; 1663 glDisable GL_TEXTURE_2D;
1662} 1664}
1663 1665
1664############################################################################# 1666#############################################################################

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines