--- deliantra/Deliantra-Client/DC/MapWidget.pm 2006/04/24 03:33:51 1.11 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2006/04/24 13:04:31 1.16 @@ -1,6 +1,7 @@ package CFClient::MapWidget; use strict; +use utf8; use List::Util qw(min max); @@ -85,6 +86,7 @@ my $sw = int $::WIDTH / (32 * $::CFG->{map_scale}); my $sh = int $::HEIGHT / (32 * $::CFG->{map_scale}); + glPushMatrix; glScale $::CFG->{map_scale}, $::CFG->{map_scale}; my $sx = $::CFG->{map_shift_x} / $::CFG->{map_scale}; my $sx0 = $sx & 31; $sx = ($sx - $sx0) / 32; @@ -145,6 +147,8 @@ glEnable GL_TEXTURE_2D; glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; + glPopMatrix; + $self->{mapmap_texture} = new CFClient::Texture w => $w, @@ -216,6 +220,8 @@ if ($sym == CFClient::SDLK_KP5) { $::CONN->user_send ("stay fire"); + } elsif ($sym == ord ",") { + $::CONN->user_send ("take"); } elsif ($sym == ord "a") { $::CONN->user_send ("apply"); } elsif ($sym == ord "'") { @@ -247,6 +253,7 @@ }, ; $self->{command_widget}->key_down ($ev); + return unless $self->{command_widget}; $self->{command_widget}->show; $self->{command_widget}->focus_in; } @@ -318,7 +325,7 @@ for (@$command) { if ($_->[0] =~ $search_abbrev) { push @found, [$_->[0], $_]; - } elsif ($_[1] =~ $search_full) { + } elsif ($_->[1] =~ $search_full) { push @found, [$_->[1], $_]; } } @@ -355,6 +362,7 @@ } } elsif ($ev->{sym} == 27) { $self->emit ("close"); + return; } elsif ((chr $ev->{unicode}) =~ /^[[:alpha:]]$/) { $self->{search} .= chr $ev->{unicode}; $self->update_labels;