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.459 by root, Sat Dec 29 13:44:30 2007 UTC vs.
Revision 1.470 by root, Fri Sep 19 02:24:32 2008 UTC

293 293
294 $self->emit (visibility_change => 1); 294 $self->emit (visibility_change => 1);
295 295
296 $self->realloc if !exists $self->{req_w}; 296 $self->realloc if !exists $self->{req_w};
297 297
298 $_->set_visible for $self->children; 298 $_->set_visible for $self->visible_children;
299} 299}
300 300
301sub set_invisible { 301sub set_invisible {
302 my ($self) = @_; 302 my ($self) = @_;
303 303
1256 fontsize => ($arg{border} || 0.8) * 0.75; 1256 fontsize => ($arg{border} || 0.8) * 0.75;
1257 } 1257 }
1258 1258
1259 my $self = $class->SUPER::new ( 1259 my $self = $class->SUPER::new (
1260 # label => "", 1260 # label => "",
1261 fg => [0.6, 0.3, 0.1], 1261 fg => undef,
1262 border => 0.8, 1262 border => 0.8,
1263 style => 'single', 1263 style => 'single',
1264 %arg, 1264 %arg,
1265 ); 1265 );
1266 1266
1319 my $border = $self->border; 1319 my $border = $self->border;
1320 my ($w, $h) = ($self->{w}, $self->{h}); 1320 my ($w, $h) = ($self->{w}, $self->{h});
1321 1321
1322 $child->draw; 1322 $child->draw;
1323 1323
1324 glColor @{$self->{fg}}; 1324 glColor @{$self->{fg} || $DC::THEME{fancyframe}};
1325 glBegin GL_LINE_STRIP; 1325 glBegin GL_LINE_STRIP;
1326 glVertex $border * 1.5 , $border * 0.5 + 0.5; 1326 glVertex $border * 1.5 , $border * 0.5 + 0.5;
1327 glVertex $border * 0.5 + 0.5, $border * 0.5 + 0.5; 1327 glVertex $border * 0.5 + 0.5, $border * 0.5 + 0.5;
1328 glVertex $border * 0.5 + 0.5, $h - $border * 0.5 + 0.5; 1328 glVertex $border * 0.5 + 0.5, $h - $border * 0.5 + 0.5;
1329 glVertex $w - $border * 0.5 + 0.5, $h - $border * 0.5 + 0.5; 1329 glVertex $w - $border * 0.5 + 0.5, $h - $border * 0.5 + 0.5;
1344our @ISA = DC::UI::Bin::; 1344our @ISA = DC::UI::Bin::;
1345 1345
1346use DC::OpenGL; 1346use DC::OpenGL;
1347 1347
1348my $bg = 1348my $bg =
1349 new_from_file DC::Texture DC::find_rcfile "d1_bg.png", 1349 new_from_resource DC::Texture "d1_bg.png",
1350 mipmap => 1, wrap => 1; 1350 mipmap => 1, wrap => 1;
1351 1351
1352my @border = 1352my @border =
1353 map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } 1353 map { new_from_resource DC::Texture $_, mipmap => 1 }
1354 qw(d1_border_top.png d1_border_right.png d1_border_left.png d1_border_bottom.png); 1354 qw(d1_border_top.png d1_border_right.png d1_border_left.png d1_border_bottom.png);
1355 1355
1356my @icon = 1356my @icon =
1357 map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } 1357 map { new_from_resource DC::Texture $_, mipmap => 1 }
1358 qw(x1_move.png x1_resize.png); 1358 qw(x1_move.png x1_resize.png);
1359 1359
1360sub new { 1360sub new {
1361 my ($class, %arg) = @_; 1361 my ($class, %arg) = @_;
1362 1362
1363 my $self = $class->SUPER::new ( 1363 my $self = $class->SUPER::new (
1364 bg => [1, 1, 1, 1], 1364 bg => [1, 1, 1, 1],
1365 border_bg => [1, 1, 1, 1], 1365 border_bg => [1, 1, 1, 1],
1366 border => 0.6, 1366 border => 0.8,
1367 can_events => 1, 1367 can_events => 1,
1368 min_w => 64, 1368 min_w => 64,
1369 min_h => 32, 1369 min_h => 32,
1370 %arg, 1370 %arg,
1371 ); 1371 );
2090 my $class = shift; 2090 my $class = shift;
2091 2091
2092 $class->SUPER::new ( 2092 $class->SUPER::new (
2093 fg => [1, 1, 1], 2093 fg => [1, 1, 1],
2094 bg => [0, 0, 0, 0.2], 2094 bg => [0, 0, 0, 0.2],
2095 outline => [0.6, 0.3, 0.1], 2095 outline => undef,
2096 active_bg => [0, 0, 1, .2], 2096 active_bg => [0, 0, 1, .2],
2097 active_fg => [1, 1, 1], 2097 active_fg => [1, 1, 1],
2098 active_outline => [1, 1, 0], 2098 active_outline => [1, 1, 0],
2099 can_hover => 1, 2099 can_hover => 1,
2100 can_focus => 1, 2100 can_focus => 1,
2158 2158
2159 my $text = $self->get_text; 2159 my $text = $self->get_text;
2160 2160
2161 $self->{cursor} = List::Util::max 0, List::Util::min $self->{cursor}, length $text; 2161 $self->{cursor} = List::Util::max 0, List::Util::min $self->{cursor}, length $text;
2162 2162
2163 if ($uni == 8) { 2163 if ($sym == DC::SDLK_BACKSPACE) {
2164 substr $text, --$self->{cursor}, 1, "" if $self->{cursor}; 2164 substr $text, --$self->{cursor}, 1, "" if $self->{cursor};
2165 } elsif ($uni == 127) { 2165 } elsif ($sym == DC::SDLK_DELETE) {
2166 substr $text, $self->{cursor}, 1, ""; 2166 substr $text, $self->{cursor}, 1, "";
2167 } elsif ($sym == DC::SDLK_LEFT) { 2167 } elsif ($sym == DC::SDLK_LEFT) {
2168 --$self->{cursor} if $self->{cursor}; 2168 --$self->{cursor} if $self->{cursor};
2169 } elsif ($sym == DC::SDLK_RIGHT) { 2169 } elsif ($sym == DC::SDLK_RIGHT) {
2170 ++$self->{cursor} if $self->{cursor} < length $self->{text}; 2170 ++$self->{cursor} if $self->{cursor} < length $self->{text};
2273 glColor @{$self->{active_outline}}; 2273 glColor @{$self->{active_outline}};
2274 glRect_lineloop 1.5, 1.5, $self->{w} - 1.5, $self->{h} - 1.5; 2274 glRect_lineloop 1.5, 1.5, $self->{w} - 1.5, $self->{h} - 1.5;
2275 glLineWidth 1; 2275 glLineWidth 1;
2276 2276
2277 } else { 2277 } else {
2278 glColor @{$self->{outline}}; 2278 glColor @{$self->{outline} || $DC::THEME{entry_outline}};
2279 glBegin GL_LINE_STRIP; 2279 glBegin GL_LINE_STRIP;
2280 glVertex .5, $self->{h} * .5; 2280 glVertex .5, $self->{h} * .5;
2281 glVertex .5, $self->{h} - 2.5; 2281 glVertex .5, $self->{h} - 2.5;
2282 glVertex $self->{w} - .5, $self->{h} - 2.5; 2282 glVertex $self->{w} - .5, $self->{h} - 2.5;
2283 glVertex $self->{w} - .5, $self->{h} * .5; 2283 glVertex $self->{w} - .5, $self->{h} * .5;
2290package DC::UI::Entry; 2290package DC::UI::Entry;
2291 2291
2292our @ISA = DC::UI::EntryBase::; 2292our @ISA = DC::UI::EntryBase::;
2293 2293
2294use DC::OpenGL; 2294use DC::OpenGL;
2295
2296sub new {
2297 my $class = shift;
2298
2299 $class->SUPER::new (
2300 history_pointer => -1,
2301 @_
2302 )
2303}
2304
2295 2305
2296sub invoke_key_down { 2306sub invoke_key_down {
2297 my ($self, $ev) = @_; 2307 my ($self, $ev) = @_;
2298 2308
2299 my $sym = $ev->{sym}; 2309 my $sym = $ev->{sym};
2324 $self->{history_pointer} = -1 if $self->{history_pointer} < 0; 2334 $self->{history_pointer} = -1 if $self->{history_pointer} < 0;
2325 2335
2326 if ($self->{history_pointer} >= 0) { 2336 if ($self->{history_pointer} >= 0) {
2327 $self->set_text ($self->{history}->[$self->{history_pointer}]); 2337 $self->set_text ($self->{history}->[$self->{history_pointer}]);
2328 } else { 2338 } else {
2339 if (defined $self->{history_saveback}) {
2329 $self->set_text ($self->{history_saveback}); 2340 $self->set_text ($self->{history_saveback});
2341 $self->{history_saveback} = undef;
2342 }
2330 } 2343 }
2331 2344
2332 } else { 2345 } else {
2333 return $self->SUPER::invoke_key_down ($ev) 2346 return $self->SUPER::invoke_key_down ($ev)
2334 } 2347 }
2392our @ISA = DC::UI::Bin::; 2405our @ISA = DC::UI::Bin::;
2393 2406
2394use DC::OpenGL; 2407use DC::OpenGL;
2395 2408
2396my @tex = 2409my @tex =
2397 map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } 2410 map { new_from_resource DC::Texture $_, mipmap => 1 }
2398 qw(b1_button_inactive.png b1_button_active.png); 2411 qw(b1_button_inactive.png b1_button_active.png);
2399 2412
2400sub new { 2413sub new {
2401 my $class = shift; 2414 my $class = shift;
2402 2415
2441our @ISA = DC::UI::Label::; 2454our @ISA = DC::UI::Label::;
2442 2455
2443use DC::OpenGL; 2456use DC::OpenGL;
2444 2457
2445my @tex = 2458my @tex =
2446 map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } 2459 map { new_from_resource DC::Texture $_, mipmap => 1 }
2447 qw(b1_button_inactive.png b1_button_active.png); 2460 qw(b1_button_inactive.png b1_button_active.png);
2448 2461
2449sub new { 2462sub new {
2450 my $class = shift; 2463 my $class = shift;
2451 2464
2494package DC::UI::CheckBox; 2507package DC::UI::CheckBox;
2495 2508
2496our @ISA = DC::UI::DrawBG::; 2509our @ISA = DC::UI::DrawBG::;
2497 2510
2498my @tex = 2511my @tex =
2499 map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } 2512 map { new_from_resource DC::Texture $_, mipmap => 1 }
2500 qw(c1_checkbox_bg.png c1_checkbox_active.png); 2513 qw(c1_checkbox_bg.png c1_checkbox_active.png);
2501 2514
2502use DC::OpenGL; 2515use DC::OpenGL;
2503 2516
2504sub new { 2517sub new {
2585 2598
2586 $self->{path} || $self->{tex} 2599 $self->{path} || $self->{tex}
2587 or Carp::croak "'path' or 'tex' attributes required"; 2600 or Carp::croak "'path' or 'tex' attributes required";
2588 2601
2589 $self->{tex} ||= $texture_cache{$self->{path}} ||= 2602 $self->{tex} ||= $texture_cache{$self->{path}} ||=
2590 new_from_file DC::Texture DC::find_rcfile $self->{path}, mipmap => 1; 2603 new_from_resource DC::Texture $self->{path}, mipmap => 1;
2591 2604
2592 DC::weaken $texture_cache{$self->{path}}; 2605 DC::weaken $texture_cache{$self->{path}};
2593 2606
2594 $self->{aspect} ||= $self->{tex}{w} / $self->{tex}{h}; 2607 $self->{aspect} ||= $self->{tex}{w} / $self->{tex}{h};
2595 2608
2691 2704
2692use DC::OpenGL; 2705use DC::OpenGL;
2693 2706
2694my %tex = ( 2707my %tex = (
2695 food => [ 2708 food => [
2696 map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } 2709 map { new_from_resource DC::Texture $_, mipmap => 1 }
2697 qw/g1_food_gauge_empty.png g1_food_gauge_full.png/ 2710 qw/g1_food_gauge_empty.png g1_food_gauge_full.png/
2698 ], 2711 ],
2699 grace => [ 2712 grace => [
2700 map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } 2713 map { new_from_resource DC::Texture $_, mipmap => 1 }
2701 qw/g1_grace_gauge_empty.png g1_grace_gauge_full.png g1_grace_gauge_overflow.png/ 2714 qw/g1_grace_gauge_empty.png g1_grace_gauge_full.png g1_grace_gauge_overflow.png/
2702 ], 2715 ],
2703 hp => [ 2716 hp => [
2704 map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } 2717 map { new_from_resource DC::Texture $_, mipmap => 1 }
2705 qw/g1_hp_gauge_empty.png g1_hp_gauge_full.png/ 2718 qw/g1_hp_gauge_empty.png g1_hp_gauge_full.png/
2706 ], 2719 ],
2707 mana => [ 2720 mana => [
2708 map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } 2721 map { new_from_resource DC::Texture $_, mipmap => 1 }
2709 qw/g1_mana_gauge_empty.png g1_mana_gauge_full.png g1_mana_gauge_overflow.png/ 2722 qw/g1_mana_gauge_empty.png g1_mana_gauge_full.png g1_mana_gauge_overflow.png/
2710 ], 2723 ],
2711); 2724);
2712 2725
2713# eg. VGauge->new (gauge => 'food'), default gauge: food 2726# eg. VGauge->new (gauge => 'food'), default gauge: food
3010use DC::OpenGL; 3023use DC::OpenGL;
3011 3024
3012our @ISA = DC::UI::DrawBG::; 3025our @ISA = DC::UI::DrawBG::;
3013 3026
3014my @tex = 3027my @tex =
3015 map { new_from_file DC::Texture DC::find_rcfile $_ } 3028 map { new_from_resource DC::Texture $_ }
3016 qw(s1_slider.png s1_slider_bg.png); 3029 qw(s1_slider.png s1_slider_bg.png);
3017 3030
3018sub new { 3031sub new {
3019 my $class = shift; 3032 my $class = shift;
3020 3033
3057sub set_value { 3070sub set_value {
3058 my ($self, $value) = @_; 3071 my ($self, $value) = @_;
3059 3072
3060 my ($old_value, $lo, $hi, $page, $unit) = @{$self->{range}}; 3073 my ($old_value, $lo, $hi, $page, $unit) = @{$self->{range}};
3061 3074
3062 $hi = $lo + 1 if $hi <= $lo; 3075 $hi = $lo if $hi < $lo;
3063 3076
3064 $page = $hi - $lo if $page > $hi - $lo; 3077 $value = $hi - $page if $value > $hi - $page;
3065
3066 $value = $lo if $value < $lo; 3078 $value = $lo if $value < $lo;
3067 $value = $hi - $page if $value > $hi - $page;
3068 3079
3069 $value = $lo + $unit * int +($value - $lo + $unit * 0.5) / $unit 3080 $value = $lo + $unit * int +($value - $lo + $unit * 0.5) / $unit
3070 if $unit; 3081 if $unit;
3071 3082
3072 @{$self->{range}} = ($value, $lo, $hi, $page, $unit); 3083 @{$self->{range}} = ($value, $lo, $hi, $page, $unit);
3136 my ($self) = @_; 3147 my ($self) = @_;
3137 3148
3138 unless ($self->{knob_w}) { 3149 unless ($self->{knob_w}) {
3139 $self->set_value ($self->{range}[0]); 3150 $self->set_value ($self->{range}[0]);
3140 3151
3141 my ($value, $lo, $hi, $page) = @{$self->{range}}; 3152 my ($value, $lo, $hi, $page, $unit) = @{$self->{range}};
3142 my $range = ($hi - $page - $lo) || 1e-100; 3153 my $range = ($hi - $page - $lo) || 1e-10;
3143 3154
3144 my $knob_w = List::Util::min 1, $page / ($hi - $lo) || 0.1; 3155 my $knob_w = List::Util::min 1, $page / (($hi - $lo) || 1e-10) || 24 / $self->{w};
3145 3156
3146 $self->{offset} = List::Util::max $self->{inner_pad}, $knob_w * 0.5; 3157 $self->{offset} = List::Util::max $self->{inner_pad}, $knob_w * 0.5;
3147 $self->{scale} = 1 - 2 * $self->{offset} || 1e-100; 3158 $self->{scale} = 1 - 2 * $self->{offset} || 1e-100;
3148 3159
3149 $value = ($value - $lo) / $range; 3160 $value = ($value - $lo) / $range;
3609 3620
3610 $tip =~ s/^\n+//; 3621 $tip =~ s/^\n+//;
3611 $tip =~ s/\n+$//; 3622 $tip =~ s/\n+$//;
3612 3623
3613 $self->add (new DC::UI::Label 3624 $self->add (new DC::UI::Label
3625 fg => $DC::THEME{tooltip_fg},
3614 markup => $tip, 3626 markup => $tip,
3615 max_w => ($widget->{tooltip_width} || 0.25) * $::WIDTH, 3627 max_w => ($widget->{tooltip_width} || 0.25) * $::WIDTH,
3616 align => 0, 3628 align => 0,
3617 fontsize => 0.8, 3629 fontsize => 0.8,
3618 style => 1, # FLAG_INVERSE 3630 style => $DC::THEME{tooltip_style}, # FLAG_INVERSE
3619 ellipsise => 0, 3631 ellipsise => 0,
3620 font => ($widget->{tooltip_font} || $::FONT_PROP), 3632 font => ($widget->{tooltip_font} || $::FONT_PROP),
3621 ); 3633 );
3622} 3634}
3623 3635
3660sub _draw { 3672sub _draw {
3661 my ($self) = @_; 3673 my ($self) = @_;
3662 3674
3663 my ($w, $h) = @$self{qw(w h)}; 3675 my ($w, $h) = @$self{qw(w h)};
3664 3676
3665 glColor 1, 0.8, 0.4; 3677 glColor @{ $DC::THEME{tooltip_bg} };
3666 glRect 0, 0, $w, $h; 3678 glRect 0, 0, $w, $h;
3667 3679
3668 glColor 0, 0, 0; 3680 glColor @{ $DC::THEME{tooltip_border} };
3669 glRect_lineloop .5, .5, $w + .5, $h + .5; 3681 glRect_lineloop .5, .5, $w + .5, $h + .5;
3670 3682
3671 glTranslate 2, 2; 3683 glTranslate 2, 2;
3672 3684
3673 $self->SUPER::_draw; 3685 $self->SUPER::_draw;
3845 $widget = new DC::UI::HBox 3857 $widget = new DC::UI::HBox
3846 can_hover => 1, 3858 can_hover => 1,
3847 can_events => 1, 3859 can_events => 1,
3848 tooltip => $tooltip, 3860 tooltip => $tooltip,
3849 children => [ 3861 children => [
3850 (new DC::UI::Label markup => $left, expand => 1), 3862 (new DC::UI::Label markup => $left , align => 0, expand => 1),
3851 (new DC::UI::Label markup => $right, align => 1), 3863 (new DC::UI::Label markup => $right, align => 1),
3852 ], 3864 ],
3853 ; 3865 ;
3854 3866
3855 } else { 3867 } else {
3921 3933
3922 my $self = $class->SUPER::new ( 3934 my $self = $class->SUPER::new (
3923 @_, 3935 @_,
3924 ); 3936 );
3925 3937
3926 $self->{current} = $self->{children}[0] 3938 $self->set_current_page (0);
3927 if @{ $self->{children} };
3928 3939
3929 $self 3940 $self
3930} 3941}
3931 3942
3932sub add { 3943sub add {
3933 my ($self, @widgets) = @_; 3944 my ($self, @widgets) = @_;
3934 3945
3935 $self->SUPER::add (@widgets); 3946 $self->SUPER::add (@widgets);
3936 3947
3937 $self->{current} = $self->{children}[0] 3948 $self->set_current_page (0)
3938 if @{ $self->{children} }; 3949 unless @widgets == @{ $self->{children} };
3939} 3950}
3940 3951
3941sub get_current_page { 3952sub get_current_page {
3942 my ($self) = @_; 3953 my ($self) = @_;
3943 3954
3949 3960
3950 my $widget = ref $page_or_widget 3961 my $widget = ref $page_or_widget
3951 ? $page_or_widget 3962 ? $page_or_widget
3952 : $self->{children}[$page_or_widget]; 3963 : $self->{children}[$page_or_widget];
3953 3964
3965 $self->{current}->set_invisible if $self->{current} && $self->{visible};
3966
3954 $self->{current} = $widget; 3967 if (($self->{current} = $widget)) {
3968 $self->{current}->set_visible if $self->{current} && $self->{visible};
3955 $self->{current}->configure (0, 0, $self->{w}, $self->{h}); 3969 $self->{current}->configure (0, 0, $self->{w}, $self->{h});
3956 3970
3957 $self->emit (page_changed => $self->{current}); 3971 $self->emit (page_changed => $self->{current});
3972 }
3958 3973
3959 $self->realloc; 3974 $self->realloc;
3960} 3975}
3961 3976
3962sub visible_children { 3977sub visible_children {
3963 $_[0]{current} 3978 $_[0]{current} || ()
3964} 3979}
3965 3980
3966sub size_request { 3981sub size_request {
3967 my ($self) = @_; 3982 my ($self) = @_;
3968 3983
3984 $self->{current}
3969 $self->{current}->size_request 3985 ? $self->{current}->size_request
3986 : (0, 0)
3970} 3987}
3971 3988
3972sub invoke_size_allocate { 3989sub invoke_size_allocate {
3973 my ($self, $w, $h) = @_; 3990 my ($self, $w, $h) = @_;
3974 3991
3975 $self->{current}->configure (0, 0, $w, $h); 3992 $self->{current}->configure (0, 0, $w, $h)
3993 if $self->{current};
3976 3994
3977 1 3995 1
3978} 3996}
3979 3997
3980sub _draw { 3998sub _draw {
3981 my ($self) = @_; 3999 my ($self) = @_;
3982 4000
3983 $self->{current}->draw; 4001 $self->{current}->draw
4002 if $self->{current};
3984} 4003}
3985 4004
3986############################################################################# 4005#############################################################################
3987 4006
3988package DC::UI::Notebook; 4007package DC::UI::Notebook;
4055} 4074}
4056 4075
4057sub pages { 4076sub pages {
4058 my ($self) = @_; 4077 my ($self) = @_;
4059 $self->{multiplexer}->children 4078 $self->{multiplexer}->children
4079}
4080
4081sub page_index {
4082 my ($self, $widget) = @_;
4083
4084 my $i = 0;
4085 for ($self->pages) {
4086 if ($_ eq $widget) { return $i };
4087 $i++;
4088 }
4089
4090 undef
4060} 4091}
4061 4092
4062sub add_tab { 4093sub add_tab {
4063 my ($self, $title, $widget, $tooltip) = @_; 4094 my ($self, $title, $widget, $tooltip) = @_;
4064 4095
4186 $self 4217 $self
4187} 4218}
4188 4219
4189sub reorder { 4220sub reorder {
4190 my ($self) = @_; 4221 my ($self) = @_;
4191 my $NOW = Time::HiRes::time; 4222 my $NOW = EV::time;
4192 4223
4193 # freeze display when hovering over any label 4224 # freeze display when hovering over any label
4194 return if $DC::UI::TOOLTIP->{owner} 4225 return if $DC::UI::TOOLTIP->{owner}
4195 && grep $DC::UI::TOOLTIP->{owner} == $_->{label}, 4226 && grep $DC::UI::TOOLTIP->{owner} == $_->{label},
4196 values %{ $self->{item} }; 4227 values %{ $self->{item} };
4246 $label->{fg}[3] = $item->{fg}[3] || 1; 4277 $label->{fg}[3] = $item->{fg}[3] || 1;
4247 } 4278 }
4248 4279
4249 push @widgets, $label; 4280 push @widgets, $label;
4250 } 4281 }
4282
4283 my $hash = join ",", @widgets;
4284 return if $hash eq $self->{last_widget_hash};
4285 $self->{last_widget_hash} = $hash;
4251 4286
4252 $self->clear; 4287 $self->clear;
4253 $self->SUPER::add (reverse @widgets); 4288 $self->SUPER::add (reverse @widgets);
4254} 4289}
4255 4290
4556 4591
4557############################################################################# 4592#############################################################################
4558 4593
4559package DC::UI; 4594package DC::UI;
4560 4595
4561$ROOT = new DC::UI::Root; 4596$ROOT = new DC::UI::Root;
4562$TOOLTIP = new DC::UI::Tooltip z => 900; 4597$TOOLTIP = new DC::UI::Tooltip z => 900;
4563 4598
45641 45991
4565 4600

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines