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.159 by root, Mon Apr 24 03:19:42 2006 UTC vs.
Revision 1.161 by root, Mon Apr 24 03:43:51 2006 UTC

14our $BUTTON_STATE; 14our $BUTTON_STATE;
15 15
16sub check_tooltip { 16sub check_tooltip {
17 if (!$GRAB) { 17 if (!$GRAB) {
18 for (my $widget = $HOVER; $widget; $widget = $widget->{parent}) { 18 for (my $widget = $HOVER; $widget; $widget = $widget->{parent}) {
19 if (exists $widget->{tooltip}) { 19 if (length $widget->{tooltip}) {
20 20
21 if ($TOOLTIP->{owner} != $widget) { 21 if ($TOOLTIP->{owner} != $widget) {
22 $TOOLTIP->{owner} = $widget; 22 $TOOLTIP->{owner} = $widget;
23 23
24 my $tip = $widget->{tooltip}; 24 my $tip = $widget->{tooltip};
1751sub new { 1751sub new {
1752 my ($class, %arg) = @_; 1752 my ($class, %arg) = @_;
1753 1753
1754 my $self = $class->SUPER::new ( 1754 my $self = $class->SUPER::new (
1755 tooltip => $arg{type}, 1755 tooltip => $arg{type},
1756 can_events => 1,
1757 can_hover => 1,
1756 %arg, 1758 %arg,
1757 ); 1759 );
1758 1760
1759 $self->add ($self->{value} = new CFClient::UI::Label valign => +1, align => 0, template => "999", can_events => 1, can_hover => 1); 1761 $self->add ($self->{value} = new CFClient::UI::Label valign => +1, align => 0, template => "999");
1760 $self->add ($self->{gauge} = new CFClient::UI::VGauge type => $self->{type}, expand => 1, can_events => 1, can_hover => 1); 1762 $self->add ($self->{gauge} = new CFClient::UI::VGauge type => $self->{type}, expand => 1, can_hover => 1);
1761 $self->add ($self->{max} = new CFClient::UI::Label valign => -1, align => 0, template => "999", can_events => 1, can_hover => 1); 1763 $self->add ($self->{max} = new CFClient::UI::Label valign => -1, align => 0, template => "999");
1762 1764
1763 $self 1765 $self
1764} 1766}
1765 1767
1766sub set_fontsize { 1768sub set_fontsize {
2192} 2194}
2193 2195
2194sub size_request { 2196sub size_request {
2195 my ($self) = @_; 2197 my ($self) = @_;
2196 2198
2197 $self->child->set_max_size ($::WIDTH * 0.2); 2199 $self->child->set_max_size ($::WIDTH * 0.3);
2198 2200
2199 my ($w, $h) = @{$self->child}{qw(req_w req_h)}; 2201 my ($w, $h) = @{$self->child}{qw(req_w req_h)};
2200 2202
2201 ($w + 4, $h + 4) 2203 ($w + 4, $h + 4)
2202} 2204}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines