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.152 by root, Sun Apr 23 01:05:03 2006 UTC vs.
Revision 1.153 by root, Sun Apr 23 02:14:33 2006 UTC

2131 $self->emit (changed => $self->{state}); 2131 $self->emit (changed => $self->{state});
2132} 2132}
2133 2133
2134############################################################################# 2134#############################################################################
2135 2135
2136package CFClient::UI::Tooltip;
2137
2138our @ISA = CFClient::UI::Bin::;
2139
2140use CFClient::OpenGL;
2141
2142sub new {
2143 my $class = shift;
2144
2145 $class->SUPER::new (
2146 @_,
2147 can_events => 0,
2148 )
2149}
2150
2151sub set_text {
2152 my ($self, $text) = @_;
2153
2154 $self->{label} ||= new CFClient::UI::Label fontsize => 0.8;
2155 $self->{label}->set_text ($text);
2156 $self->add ($self->{label});
2157}
2158
2159sub size_request {
2160 my ($self) = @_;
2161
2162 my ($w, $h) = @{$self->child}{qw(req_w req_h)};
2163
2164 $w = List::Util::min $::WIDTH * 0.2, $w;
2165
2166 ($w, $h)
2167}
2168
2169#############################################################################
2170
2136package CFClient::UI::Root; 2171package CFClient::UI::Root;
2137 2172
2138our @ISA = CFClient::UI::Container::; 2173our @ISA = CFClient::UI::Container::;
2139 2174
2140use CFClient::OpenGL; 2175use CFClient::OpenGL;
2215############################################################################# 2250#############################################################################
2216 2251
2217package CFClient::UI; 2252package CFClient::UI;
2218 2253
2219$ROOT = new CFClient::UI::Root; 2254$ROOT = new CFClient::UI::Root;
2220$TOOLTIP = new CFClient::UI::Label fontsize => 0.8, can_events => 0; 2255$TOOLTIP = new CFClient::UI::Tooltip;
2221 2256
22221 22571
2223 2258

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines