… | |
… | |
456 | sub open_binding_dialog { |
456 | sub open_binding_dialog { |
457 | my ($cb) = @_; |
457 | my ($cb) = @_; |
458 | |
458 | |
459 | my $w = new CFClient::UI::FancyFrame |
459 | my $w = new CFClient::UI::FancyFrame |
460 | title => "Bind Action", |
460 | title => "Bind Action", |
461 | x => "center", |
461 | x => "center", |
462 | y => "center", |
462 | y => "center", |
463 | z => 1000; |
463 | z => 1000, |
|
|
464 | has_close_button => 1; |
464 | |
465 | |
465 | $w->add (my $vb = new CFClient::UI::VBox); |
466 | $w->add (my $vb = new CFClient::UI::VBox); |
466 | $vb->add (new CFClient::UI::Label |
467 | $vb->add (new CFClient::UI::Label |
467 | text => "Press a modifier (CTRL, ALT and/or SHIFT) and a key." |
468 | text => "Press a modifier (CTRL, ALT and/or SHIFT) and a key." |
468 | ."You can only bind 0-9 and F1-F15 without modifiers." |
469 | . "You can only bind 0-9 and F1-F15 without modifiers." |
469 | ); |
470 | ); |
470 | $vb->add (my $entry = new CFClient::UI::Entry |
471 | $vb->add (my $entry = new CFClient::UI::Entry |
471 | text => "", |
472 | text => "", |
472 | on_key_down => sub { |
473 | on_key_down => sub { |
473 | my ($entry, $ev) = @_; |
474 | my ($entry, $ev) = @_; |