… | |
… | |
251 | |
251 | |
252 | if ($self->{container} == $::CONN->{player}{tag}) { |
252 | if ($self->{container} == $::CONN->{player}{tag}) { |
253 | $targ = $::CONN->{open_container}; |
253 | $targ = $::CONN->{open_container}; |
254 | } |
254 | } |
255 | |
255 | |
256 | $::CONN->send ("move $targ $self->{tag} 0"); |
256 | $::CONN->send ("move $targ $self->{tag} 0") |
|
|
257 | if $targ || !($self->{flags} & F_LOCKED); |
257 | } elsif ($ev->{button} == 1) { |
258 | } elsif ($ev->{button} == 1) { |
258 | $::CONN->send ("examine $self->{tag}"); |
259 | $::CONN->send ("examine $self->{tag}"); |
259 | } elsif ($ev->{button} == 2) { |
260 | } elsif ($ev->{button} == 2) { |
260 | $::CONN->send ("apply $self->{tag}"); |
261 | $::CONN->send ("apply $self->{tag}"); |
261 | } elsif ($ev->{button} == 3) { |
262 | } elsif ($ev->{button} == 3) { |
… | |
… | |
390 | # (Bindings are stored in $::CFG->{bindings}->{$mod}->{$sym}) |
391 | # (Bindings are stored in $::CFG->{bindings}->{$mod}->{$sym}) |
391 | sub open_binding_dialog { |
392 | sub open_binding_dialog { |
392 | my ($cmd) = @_; |
393 | my ($cmd) = @_; |
393 | |
394 | |
394 | my $w = new CFClient::UI::FancyFrame |
395 | my $w = new CFClient::UI::FancyFrame |
395 | title => "Bind Action"; |
396 | title => "Bind Action", |
|
|
397 | x => "center", |
|
|
398 | y => "center"; |
396 | |
399 | |
397 | $w->add (my $vb = new CFClient::UI::VBox); |
400 | $w->add (my $vb = new CFClient::UI::VBox); |
398 | $vb->add (new CFClient::UI::Label |
401 | $vb->add (new CFClient::UI::Label |
399 | text => "Press a modifier (CTRL, ALT and/or SHIFT) and a key." |
402 | text => "Press a modifier (CTRL, ALT and/or SHIFT) and a key." |
400 | ."You can only bind 0-9 and F1-F15 without modifiers." |
403 | ."You can only bind 0-9 and F1-F15 without modifiers." |
… | |
… | |
430 | |
433 | |
431 | $w->destroy |
434 | $w->destroy |
432 | }); |
435 | }); |
433 | |
436 | |
434 | $entry->focus_in; |
437 | $entry->focus_in; |
435 | $w->center; |
|
|
436 | $w->show; |
438 | $w->show; |
437 | } |
439 | } |
438 | |
440 | |
439 | sub keycombo_to_name { |
441 | sub keycombo_to_name { |
440 | my ($mod, $sym) = @_; |
442 | my ($mod, $sym) = @_; |