--- deliantra/Deliantra-Client/DC/MapWidget.pm 2006/05/17 10:14:52 1.24 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2006/05/17 20:21:27 1.27 @@ -81,6 +81,9 @@ sub draw { my ($self) = @_; + return + unless $CFClient::UI::FOCUS == $self || !$::FAST; + if (delete $self->{need_update}) { glNewList $self->{list}; @@ -190,6 +193,10 @@ $::CONN->user_send ("take"); } elsif ($uni == ord "\t") { $::CONN->user_send ("apply"); + } elsif ($sym == CFClient::SDLK_KP_PLUS || $uni == ord "+") { + $::CONN->user_send ("rotateshoottype +"); + } elsif ($sym == CFClient::SDLK_KP_MINUS || $uni == ord "-") { + $::CONN->user_send ("rotateshoottype -"); } elsif ($uni == ord "'") { $self->emit ('activate_console'); } elsif ($uni == ord "/") { @@ -247,12 +254,11 @@ $tooltip =~ s/^\s+//; - $tooltip = "" . (CFClient::UI::Label::escape $data) . "\n\n" - . CFClient::UI::Label::escape $tooltip; + $tooltip = "$data\n\n$tooltip"; $tooltip =~ s/\s+$//; - $self->{command}{$command} = [$data, $tooltip, $widget, $cb]; + $self->{command}{$command} = [$data, $tooltip, $widget, $cb, ++$self->{command_id}]; } sub clr_commands { @@ -361,10 +367,11 @@ $self->{label} = [ map CFClient::UI::Label->new ( - can_hover => 1, - can_events => 1, - fontsize => $_, - ), (0.8) x 6 + can_hover => 1, + can_events => 1, + tooltip_width => 0.33, + fontsize => $_, + ), (0.8) x 16 ]; $self->{entry} = new CFClient::UI::Entry @@ -448,7 +455,7 @@ @match = map $self->{command}{$_->[0]}, sort { $a->[1] <=> $b->[1] - or (length $a->[0]) <=> (length $b->[0]) + or $self->{command}{$a->[0]}[4] <=> $self->{command}{$b->[0]}[4] } @match; $self->{last_search} = $cmd;