--- deliantra/Deliantra-Client/DC/MapWidget.pm 2006/06/18 17:13:11 1.63
+++ deliantra/Deliantra-Client/DC/MapWidget.pm 2006/06/21 12:59:23 1.67
@@ -40,7 +40,7 @@
. "Typing the initial letters of words (or just any letters) displays guesses "
. "for commands you might want to use.\n"
. "You can use the cursor-up and cursor-down keys to select between those guesses.\n"
- . "Right-Click opens a menu where you cna select further options, sich as redefining keybindings.",
+ . "Right-Click opens a menu where you cna select further options, sich as redefining key bindings.",
;
$self
@@ -72,8 +72,8 @@
$self->grab_focus;
if ($ev->{button} == 1) {
- my $x = CFClient::floor +($ev->{x} - $self->{sx0}) / $self->{tilesize} - $self->{sx};
- my $y = CFClient::floor +($ev->{y} - $self->{sy0}) / $self->{tilesize} - $self->{sy};
+ my $x = 1 + CFClient::floor +($ev->{x} - $self->{sx0}) / $self->{tilesize} - $self->{sx};
+ my $y = 1 + CFClient::floor +($ev->{y} - $self->{sy0}) / $self->{tilesize} - $self->{sy};
$x -= int 0.5 * $self->{sw};
$y -= int 0.5 * $self->{sh};
@@ -122,8 +122,8 @@
sub size_request {
(
- 1 + 32 * int $::WIDTH / 32,
- 1 + 32 * int $::HEIGHT / 32,
+ 32 * CFClient::ceil $::WIDTH / 32,
+ 32 * CFClient::ceil $::HEIGHT / 32,
)
}
@@ -197,7 +197,7 @@
$::BIND_EDITOR->set_binding (undef, undef, [],
sub {
my ($mod, $sym, $cmds) = @_;
- $::CFG->{bindings}->{$mod}->{$sym} = $cmds;
+ $::BIND_EDITOR->cfg_bind ($mod, $sym, $cmds);
});
$::BIND_EDITOR->start;
$::BIND_EDITOR->show;
@@ -205,10 +205,10 @@
$::BIND_EDITOR->stop;
$::BIND_EDITOR->ask_for_bind_and_commit;
$::BIND_EDITOR->hide;
- } elsif (my $bind_cmd = $::CFG->{bindings}->{$mod}->{$sym}) {
+ } elsif (my $bind_cmd = $::CFG->{profile}{default}{bindings}{$mod}{$sym}) {
$::CONN->user_send ($_) for @$bind_cmd;
} elsif ((ord 'a') <= $uni && $uni <= (ord 'z')) {
- $self->{completer}->key_down ($ev);
+ $self->{completer}->invoke_key_down ($ev);
$self->{completer}->show;
} else {
return 0;
@@ -515,7 +515,6 @@
} elsif ($ev->{sym} == 27) {
$self->{hist_ptr} = 0;
$self->hide;
- return;
} elsif ($ev->{sym} == CFClient::SDLK_DOWN) {
if ($self->{hist_ptr} > 1) {
$self->{hist_ptr}--;
@@ -590,7 +589,7 @@
sub invoke_key_down {
my ($self, $ev) = @_;
- $self->{entry}->key_down ($ev)
+ $self->{entry}->emit (key_down => $ev)
}
sub update_labels {
@@ -687,7 +686,6 @@
}
$self->update;
- ###
}
sub _draw {