ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/MapWidget.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.23 by root, Wed May 17 00:26:55 2006 UTC vs.
Revision 1.26 by root, Wed May 17 16:17:01 2006 UTC

78 $self->SUPER::update; 78 $self->SUPER::update;
79} 79}
80 80
81sub draw { 81sub draw {
82 my ($self) = @_; 82 my ($self) = @_;
83
84 return
85 unless $CFClient::UI::FOCUS == $self || !$::FAST;
83 86
84 if (delete $self->{need_update}) { 87 if (delete $self->{need_update}) {
85 glNewList $self->{list}; 88 glNewList $self->{list};
86 89
87 if ($::MAP) { 90 if ($::MAP) {
245 248
246 (my $data = $command) =~ s/\\//g; 249 (my $data = $command) =~ s/\\//g;
247 250
248 $tooltip =~ s/^\s+//; 251 $tooltip =~ s/^\s+//;
249 252
250 $tooltip = "<big>" . (CFClient::UI::Label::escape $data) . "</big>\n\n" 253 $tooltip = "<big>$data</big>\n\n$tooltip";
251 . CFClient::UI::Label::escape $tooltip;
252 254
253 $tooltip =~ s/\s+$//; 255 $tooltip =~ s/\s+$//;
254 256
255 $self->{command}{$command} = [$data, $tooltip, $widget, $cb]; 257 $self->{command}{$command} = [$data, $tooltip, $widget, $cb];
256} 258}
359 $self->add ($self->{vbox} = new CFClient::UI::VBox); 361 $self->add ($self->{vbox} = new CFClient::UI::VBox);
360 362
361 $self->{label} = [ 363 $self->{label} = [
362 map 364 map
363 CFClient::UI::Label->new ( 365 CFClient::UI::Label->new (
364 can_hover => 1, 366 can_hover => 1,
365 can_events => 1, 367 can_events => 1,
368 tooltip_width => 0.33,
366 fontsize => $_, 369 fontsize => $_,
367 ), (0.8) x 6 370 ), (0.8) x 6
368 ]; 371 ];
369 372
370 $self->{entry} = new CFClient::UI::Entry 373 $self->{entry} = new CFClient::UI::Entry
371 connect_changed => sub { 374 connect_changed => sub {
477 $self->{select} = "$matches[0][0]$arg"; 480 $self->{select} = "$matches[0][0]$arg";
478 481
479 $labels[0]->{fg} = [0, 0, 0, 1]; 482 $labels[0]->{fg} = [0, 0, 0, 1];
480 $labels[0]->{bg} = [1, 1, 1, 0.8]; 483 $labels[0]->{bg} = [1, 1, 1, 0.8];
481 } else { 484 } else {
482 delete $self->{select}; 485 $self->{select} = "$cmd$arg";
483 } 486 }
484 487
485 for my $match (@matches) { 488 for my $match (@matches) {
486 my $label = shift @labels; 489 my $label = shift @labels;
487 490

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines