ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/UI.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.353 by root, Thu Nov 16 19:42:45 2006 UTC vs.
Revision 1.356 by root, Wed Dec 6 00:15:12 2006 UTC

514); 514);
515 515
516sub emit { 516sub emit {
517 my ($self, $signal, @args) = @_; 517 my ($self, $signal, @args) = @_;
518 518
519 # I do not really like this solution, but I dislike duplication 519 # I do not really like this solution, but I do not like duplication
520 # and needlessly verbose code, too. 520 # and needlessly verbose code, either.
521 my @append 521 my @append
522 = $has_coords{$signal} 522 = $has_coords{$signal}
523 ? $args[0]->xy ($self) 523 ? $args[0]->xy ($self)
524 : (); 524 : ();
525 525
3827 if ($ev->{button} == 1) { 3827 if ($ev->{button} == 1) {
3828 $::CONN->user_send ("cast $spell->{name}"); 3828 $::CONN->user_send ("cast $spell->{name}");
3829 } elsif ($ev->{button} == 2) { 3829 } elsif ($ev->{button} == 2) {
3830 $::CONN->user_send ("invoke $spell->{name}"); 3830 $::CONN->user_send ("invoke $spell->{name}");
3831 } elsif ($ev->{button} == 3) { 3831 } elsif ($ev->{button} == 3) {
3832 my $shortname = CFPlus::shorten $spell->{name}, 14;
3832 (new CFPlus::UI::Menu 3833 (new CFPlus::UI::Menu
3833 items => [ 3834 items => [
3834 ["bind <i>cast $spell->{name}</i> to a key" => sub { $::BIND_EDITOR->do_quick_binding (["cast $spell->{name}"]) }], 3835 ["bind <i>cast $shortname</i> to a key" => sub { $::BIND_EDITOR->do_quick_binding (["cast $spell->{name}"]) }],
3835 ["bind <i>invoke $spell->{name}</i> to a key" => sub { $::BIND_EDITOR->do_quick_binding (["invoke $spell->{name}"]) }], 3836 ["bind <i>invoke $shortname</i> to a key" => sub { $::BIND_EDITOR->do_quick_binding (["invoke $spell->{name}"]) }],
3836 ], 3837 ],
3837 )->popup ($ev); 3838 )->popup ($ev);
3838 } else { 3839 } else {
3839 return 0; 3840 return 0;
3840 } 3841 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines