1 | package CFClient::MapWidget; |
1 | package CFClient::MapWidget; |
2 | |
2 | |
3 | use strict; |
3 | use strict; |
|
|
4 | use utf8; |
4 | |
5 | |
5 | use List::Util qw(min max); |
6 | use List::Util qw(min max); |
6 | |
7 | |
7 | use CFClient::OpenGL; |
8 | use CFClient::OpenGL; |
8 | |
9 | |
… | |
… | |
214 | my $mod = $ev->{mod}; |
215 | my $mod = $ev->{mod}; |
215 | my $sym = $ev->{sym}; |
216 | my $sym = $ev->{sym}; |
216 | |
217 | |
217 | if ($sym == CFClient::SDLK_KP5) { |
218 | if ($sym == CFClient::SDLK_KP5) { |
218 | $::CONN->user_send ("stay fire"); |
219 | $::CONN->user_send ("stay fire"); |
|
|
220 | } elsif ($sym == ord ",") { |
|
|
221 | $::CONN->user_send ("take"); |
219 | } elsif ($sym == ord "a") { |
222 | } elsif ($sym == ord "a") { |
220 | $::CONN->user_send ("apply"); |
223 | $::CONN->user_send ("apply"); |
221 | } elsif ($sym == ord "'") { |
224 | } elsif ($sym == ord "'") { |
222 | $self->emit ('activate_console'); |
225 | $self->emit ('activate_console'); |
223 | } elsif ($sym == ord "/") { |
226 | } elsif ($sym == ord "/") { |
… | |
… | |
317 | my @found; |
320 | my @found; |
318 | |
321 | |
319 | for (@$command) { |
322 | for (@$command) { |
320 | if ($_->[0] =~ $search_abbrev) { |
323 | if ($_->[0] =~ $search_abbrev) { |
321 | push @found, [$_->[0], $_]; |
324 | push @found, [$_->[0], $_]; |
322 | } elsif ($_[1] =~ $search_full) { |
325 | } elsif ($_->[1] =~ $search_full) { |
323 | push @found, [$_->[1], $_]; |
326 | push @found, [$_->[1], $_]; |
324 | } |
327 | } |
325 | } |
328 | } |
326 | |
329 | |
327 | @found = sort { $a->[0] cmp $b->[0] } @found; |
330 | @found = sort { $a->[0] cmp $b->[0] } @found; |