ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/MapWidget.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.43 by elmex, Mon May 29 19:30:28 2006 UTC vs.
Revision 1.45 by elmex, Tue May 30 14:35:09 2006 UTC

156 $::CONN->user_send ("run $DIR{$sym}[0]"); 156 $::CONN->user_send ("run $DIR{$sym}[0]");
157 } else { 157 } else {
158 $::CONN->user_send ("$DIR{$sym}[1]"); 158 $::CONN->user_send ("$DIR{$sym}[1]");
159 } 159 }
160 } elsif ($sym == CFClient::SDLK_INSERT && $mod & CFClient::KMOD_CTRL) { 160 } elsif ($sym == CFClient::SDLK_INSERT && $mod & CFClient::KMOD_CTRL) {
161 CFClient::Recorder::start (1); 161 $::BIND_EDITOR->set_binding (undef, undef, [],
162 sub {
163 my ($mod, $sym, $cmds) = @_;
164 $::CFG->{bindings}->{$mod}->{$sym} = $cmds;
165 });
166 $::BIND_EDITOR->start;
167 $::BIND_EDITOR->show;
162 } elsif ($sym == CFClient::SDLK_INSERT && not ($mod & CFClient::KMOD_CTRL)) { 168 } elsif ($sym == CFClient::SDLK_INSERT && not ($mod & CFClient::KMOD_CTRL)) {
163 CFClient::Recorder::stop (1); 169 $::BIND_EDITOR->stop;
170 $::BIND_EDITOR->ask_for_bind (1);
171 $::BIND_EDITOR->hide;
164 } elsif (my $bind_cmd = $::CFG->{bindings}->{$mod}->{$sym}) { 172 } elsif (my $bind_cmd = $::CFG->{bindings}->{$mod}->{$sym}) {
165 $::CONN->user_send ($_) for @$bind_cmd; 173 $::CONN->user_send ($_) for @$bind_cmd;
166 } elsif ((ord 'a') <= $uni && $uni <= (ord 'z')) { 174 } elsif ((ord 'a') <= $uni && $uni <= (ord 'z')) {
167 $self->{completer}->key_down ($ev); 175 $self->{completer}->key_down ($ev);
168 $self->{completer}->show; 176 $self->{completer}->show;
283# 291#
284# $label->show; 292# $label->show;
285# $label->update; 293# $label->update;
286# 294#
287# $CFClient::UI::ROOT->on_post_alloc ("$self$label" => sub { 295# $CFClient::UI::ROOT->on_post_alloc ("$self$label" => sub {
288# $label->move ( 296# $label->move_abs (
289# ($::WIDTH - $label->{w}) * 0.5, 297# ($::WIDTH - $label->{w}) * 0.5,
290# ($::HEIGHT - $label->{h}) * 0.5, 298# ($::HEIGHT - $label->{h}) * 0.5,
291# ); 299# );
292# }); 300# });
293# 301#
462 470
463sub size_allocate { 471sub size_allocate {
464 my ($self, $w, $h) = @_; 472 my ($self, $w, $h) = @_;
465 473
466 $self->SUPER::size_allocate ($w, $h); 474 $self->SUPER::size_allocate ($w, $h);
467 $self->move (($::WIDTH - $w) * 0.5, ($::HEIGHT - $h) * 0.6, 10); 475 $self->move_abs (($::WIDTH - $w) * 0.5, ($::HEIGHT - $h) * 0.6, 10);
468} 476}
469 477
470sub show { 478sub show {
471 my ($self) = @_; 479 my ($self) = @_;
472 480

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines