--- deliantra/Deliantra-Client/DC/MapWidget.pm 2006/05/17 15:18:57 1.25 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2006/05/17 20:50:19 1.28 @@ -81,6 +81,9 @@ sub draw { my ($self) = @_; + return + unless $CFClient::UI::FOCUS == $self || !$::FAST; + if (delete $self->{need_update}) { glNewList $self->{list}; @@ -188,8 +191,12 @@ $::CONN->user_send ("stay fire"); } elsif ($uni == ord ",") { $::CONN->user_send ("take"); - } elsif ($uni == ord "\t") { + } elsif ($uni == ord "\t" or $uni == ord " ") { $::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 "/") { @@ -251,7 +258,7 @@ $tooltip =~ s/\s+$//; - $self->{command}{$command} = [$data, $tooltip, $widget, $cb]; + $self->{command}{$command} = [$data, $tooltip, $widget, $cb, ++$self->{command_id}]; } sub clr_commands { @@ -364,7 +371,7 @@ can_events => 1, tooltip_width => 0.33, fontsize => $_, - ), (0.8) x 6 + ), (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;