--- deliantra/Deliantra-Client/DC/MapWidget.pm 2006/05/28 02:31:03 1.41 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2006/05/30 14:35:09 1.45 @@ -157,7 +157,21 @@ } else { $::CONN->user_send ("$DIR{$sym}[1]"); } - } elsif ($ev->{unicode}) { + } elsif ($sym == CFClient::SDLK_INSERT && $mod & CFClient::KMOD_CTRL) { + $::BIND_EDITOR->set_binding (undef, undef, [], + sub { + my ($mod, $sym, $cmds) = @_; + $::CFG->{bindings}->{$mod}->{$sym} = $cmds; + }); + $::BIND_EDITOR->start; + $::BIND_EDITOR->show; + } elsif ($sym == CFClient::SDLK_INSERT && not ($mod & CFClient::KMOD_CTRL)) { + $::BIND_EDITOR->stop; + $::BIND_EDITOR->ask_for_bind (1); + $::BIND_EDITOR->hide; + } elsif (my $bind_cmd = $::CFG->{bindings}->{$mod}->{$sym}) { + $::CONN->user_send ($_) for @$bind_cmd; + } elsif ((ord 'a') <= $uni && $uni <= (ord 'z')) { $self->{completer}->key_down ($ev); $self->{completer}->show; } @@ -279,7 +293,7 @@ # $label->update; # # $CFClient::UI::ROOT->on_post_alloc ("$self$label" => sub { -# $label->move ( +# $label->move_abs ( # ($::WIDTH - $label->{w}) * 0.5, # ($::HEIGHT - $label->{h}) * 0.5, # ); @@ -458,7 +472,7 @@ my ($self, $w, $h) = @_; $self->SUPER::size_allocate ($w, $h); - $self->move (($::WIDTH - $w) * 0.5, ($::HEIGHT - $h) * 0.6, 10); + $self->move_abs (($::WIDTH - $w) * 0.5, ($::HEIGHT - $h) * 0.6, 10); } sub show {