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.41 by root, Sun May 28 02:31:03 2006 UTC vs.
Revision 1.45 by elmex, Tue May 30 14:35:09 2006 UTC

155 $self->{ctrl}++; 155 $self->{ctrl}++;
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 ($ev->{unicode}) { 160 } elsif ($sym == CFClient::SDLK_INSERT && $mod & CFClient::KMOD_CTRL) {
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;
168 } elsif ($sym == CFClient::SDLK_INSERT && not ($mod & CFClient::KMOD_CTRL)) {
169 $::BIND_EDITOR->stop;
170 $::BIND_EDITOR->ask_for_bind (1);
171 $::BIND_EDITOR->hide;
172 } elsif (my $bind_cmd = $::CFG->{bindings}->{$mod}->{$sym}) {
173 $::CONN->user_send ($_) for @$bind_cmd;
174 } elsif ((ord 'a') <= $uni && $uni <= (ord 'z')) {
161 $self->{completer}->key_down ($ev); 175 $self->{completer}->key_down ($ev);
162 $self->{completer}->show; 176 $self->{completer}->show;
163 } 177 }
164} 178}
165 179
277# 291#
278# $label->show; 292# $label->show;
279# $label->update; 293# $label->update;
280# 294#
281# $CFClient::UI::ROOT->on_post_alloc ("$self$label" => sub { 295# $CFClient::UI::ROOT->on_post_alloc ("$self$label" => sub {
282# $label->move ( 296# $label->move_abs (
283# ($::WIDTH - $label->{w}) * 0.5, 297# ($::WIDTH - $label->{w}) * 0.5,
284# ($::HEIGHT - $label->{h}) * 0.5, 298# ($::HEIGHT - $label->{h}) * 0.5,
285# ); 299# );
286# }); 300# });
287# 301#
456 470
457sub size_allocate { 471sub size_allocate {
458 my ($self, $w, $h) = @_; 472 my ($self, $w, $h) = @_;
459 473
460 $self->SUPER::size_allocate ($w, $h); 474 $self->SUPER::size_allocate ($w, $h);
461 $self->move (($::WIDTH - $w) * 0.5, ($::HEIGHT - $h) * 0.6, 10); 475 $self->move_abs (($::WIDTH - $w) * 0.5, ($::HEIGHT - $h) * 0.6, 10);
462} 476}
463 477
464sub show { 478sub show {
465 my ($self) = @_; 479 my ($self) = @_;
466 480

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines