… | |
… | |
3 | use strict; |
3 | use strict; |
4 | use utf8; |
4 | use utf8; |
5 | |
5 | |
6 | use List::Util qw(min max); |
6 | use List::Util qw(min max); |
7 | |
7 | |
|
|
8 | use CFClient; |
8 | use CFClient::OpenGL; |
9 | use CFClient::OpenGL; |
|
|
10 | use CFClient::UI; |
9 | |
11 | |
10 | our @ISA = CFClient::UI::Base::; |
12 | our @ISA = CFClient::UI::Base::; |
11 | |
13 | |
12 | my $magicmap_tex = |
14 | my $magicmap_tex = |
13 | new_from_file CFClient::Texture CFClient::find_rcfile "magicmap.png", |
15 | new_from_file CFClient::Texture CFClient::find_rcfile "magicmap.png", |
… | |
… | |
525 | my ($entry, $ev, $x, $y) = @_; |
527 | my ($entry, $ev, $x, $y) = @_; |
526 | |
528 | |
527 | if ($ev->{button} == 3) { |
529 | if ($ev->{button} == 3) { |
528 | (new CFClient::UI::Menu |
530 | (new CFClient::UI::Menu |
529 | items => [ |
531 | items => [ |
530 | ["bind <i>" . (CFClient::UI::Label::escape $self->{select}) . "</i> to a key" |
532 | ["bind <i>" . (CFClient::asxml $self->{select}) . "</i> to a key" |
531 | => sub { $::BIND_EDITOR->do_quick_binding ([$self->{select}], sub { $entry->grab_focus }) }] |
533 | => sub { $::BIND_EDITOR->do_quick_binding ([$self->{select}], sub { $entry->grab_focus }) }] |
532 | ], |
534 | ], |
533 | )->popup ($ev); |
535 | )->popup ($ev); |
534 | return 1; |
536 | return 1; |
535 | } |
537 | } |