… | |
… | |
288 | if ($ev->{button} == 1) { |
288 | if ($ev->{button} == 1) { |
289 | $::CONN->user_send ("ready_skill $name"); |
289 | $::CONN->user_send ("ready_skill $name"); |
290 | } elsif ($ev->{button} == 2) { |
290 | } elsif ($ev->{button} == 2) { |
291 | $::CONN->user_send ("use_skill $name"); |
291 | $::CONN->user_send ("use_skill $name"); |
292 | } elsif ($ev->{button} == 3) { |
292 | } elsif ($ev->{button} == 3) { |
|
|
293 | my $shortname = CFPlus::shorten $name, 14; |
293 | (new CFPlus::UI::Menu |
294 | (new CFPlus::UI::Menu |
294 | items => [ |
295 | items => [ |
295 | ["bind <i>ready_skill $name</i> to a key" => sub { $::BIND_EDITOR->do_quick_binding (["ready_skill $name"]) }], |
296 | ["bind <i>ready_skill $shortname</i> to a key" => sub { $::BIND_EDITOR->do_quick_binding (["ready_skill $name"]) }], |
296 | ["bind <i>use_skill $name</i> to a key" => sub { $::BIND_EDITOR->do_quick_binding (["use_skill $name"]) }], |
297 | ["bind <i>use_skill $shortname</i> to a key" => sub { $::BIND_EDITOR->do_quick_binding (["use_skill $name"]) }], |
297 | ], |
298 | ], |
298 | )->popup ($ev); |
299 | )->popup ($ev); |
299 | } else { |
300 | } else { |
300 | return 0; |
301 | return 0; |
301 | } |
302 | } |
… | |
… | |
893 | . "map attributes $yesno[$self->{setup}{extmap} > 0]\n" |
894 | . "map attributes $yesno[$self->{setup}{extmap} > 0]\n" |
894 | . "cfplus support $yesno[$self->{cfplus_ext} > 0]" |
895 | . "cfplus support $yesno[$self->{cfplus_ext} > 0]" |
895 | . ($self->{cfplus_ext} > 0 ? ", version $self->{cfplus_ext}" : "") ."\n" |
896 | . ($self->{cfplus_ext} > 0 ? ", version $self->{cfplus_ext}" : "") ."\n" |
896 | . "map size $self->{mapw}×$self->{maph}\n" |
897 | . "map size $self->{mapw}×$self->{maph}\n" |
897 | ); |
898 | ); |
|
|
899 | |
|
|
900 | ::setup_build_button ($self->{editor_support}->{builder_ui}); |
898 | } |
901 | } |
899 | |
902 | |
900 | sub logged_in { |
903 | sub logged_in { |
901 | my ($self) = @_; |
904 | my ($self) = @_; |
902 | |
905 | |
… | |
… | |
919 | $self->update_server_info; |
922 | $self->update_server_info; |
920 | |
923 | |
921 | $self->send_command ("output-sync $::CFG->{output_sync}"); |
924 | $self->send_command ("output-sync $::CFG->{output_sync}"); |
922 | $self->send_command ("output-count $::CFG->{output_count}"); |
925 | $self->send_command ("output-count $::CFG->{output_count}"); |
923 | $self->send_command ("pickup $::CFG->{pickup}"); |
926 | $self->send_command ("pickup $::CFG->{pickup}"); |
|
|
927 | } |
|
|
928 | |
|
|
929 | sub buildat { |
|
|
930 | my ($self, $builditem, $x, $y) = @_; |
|
|
931 | |
|
|
932 | if ($self->{cfplus_ext}) { |
|
|
933 | $self->send_ext_msg (builder_build => dx => $x, dy => $y, (ref ($builditem) eq 'HASH') ? %$builditem : (item => $builditem)); |
|
|
934 | } |
924 | } |
935 | } |
925 | |
936 | |
926 | sub lookat { |
937 | sub lookat { |
927 | my ($self, $x, $y) = @_; |
938 | my ($self, $x, $y) = @_; |
928 | |
939 | |