… | |
… | |
276 | } |
276 | } |
277 | |
277 | |
278 | if (($ev->{mod} & CFClient::KMOD_SHIFT) && $ev->{button} == 1) { |
278 | if (($ev->{mod} & CFClient::KMOD_SHIFT) && $ev->{button} == 1) { |
279 | $::CONN->send ("move $targ $self->{tag} 0") |
279 | $::CONN->send ("move $targ $self->{tag} 0") |
280 | if $targ || !($self->{flags} & F_LOCKED); |
280 | if $targ || !($self->{flags} & F_LOCKED); |
|
|
281 | } elsif (($ev->{mod} & CFClient::KMOD_SHIFT) && $ev->{button} == 2) { |
|
|
282 | $self->{flags} & F_LOCKED |
|
|
283 | ? $::CONN->send ("lock " . pack "CN", 0, $self->{tag}) |
|
|
284 | : $::CONN->send ("lock " . pack "CN", 1, $self->{tag}) |
281 | } elsif ($ev->{button} == 1) { |
285 | } elsif ($ev->{button} == 1) { |
282 | $::CONN->send ("examine $self->{tag}"); |
286 | $::CONN->send ("examine $self->{tag}"); |
283 | } elsif ($ev->{button} == 2) { |
287 | } elsif ($ev->{button} == 2) { |
284 | $::CONN->send ("apply $self->{tag}"); |
288 | $::CONN->send ("apply $self->{tag}"); |
285 | } elsif ($ev->{button} == 3) { |
289 | } elsif ($ev->{button} == 3) { |
… | |
… | |
312 | |
316 | |
313 | my $tooltip_std = "<small>" |
317 | my $tooltip_std = "<small>" |
314 | . "Left click - examine item\n" |
318 | . "Left click - examine item\n" |
315 | . "Shift-Left click - " . ($self->{container} ? "move or drop" : "take") . " item\n" |
319 | . "Shift-Left click - " . ($self->{container} ? "move or drop" : "take") . " item\n" |
316 | . "Middle click - apply\n" |
320 | . "Middle click - apply\n" |
|
|
321 | . "Shift-Middle click - lock/unlock\n" |
317 | . "Right click - further options" |
322 | . "Right click - further options" |
318 | . "</small>\n"; |
323 | . "</small>\n"; |
319 | |
324 | |
320 | $self->{face_widget} ||= new CFClient::UI::Face |
325 | $self->{face_widget} ||= new CFClient::UI::Face |
321 | can_events => 1, |
326 | can_events => 1, |
… | |
… | |
467 | $mods .= "+" if $mods ne ''; |
472 | $mods .= "+" if $mods ne ''; |
468 | |
473 | |
469 | return $mods . CFClient::SDL_GetKeyName ($sym); |
474 | return $mods . CFClient::SDL_GetKeyName ($sym); |
470 | } |
475 | } |
471 | |
476 | |
|
|
477 | package CFClient::Pickup; |
|
|
478 | # some pickup constants |
|
|
479 | sub PU_NOTHING { 0x00000000 } |
|
|
480 | |
|
|
481 | sub PU_DEBUG { 0x10000000 } |
|
|
482 | sub PU_INHIBIT { 0x20000000 } |
|
|
483 | sub PU_STOP { 0x40000000 } |
|
|
484 | sub PU_NEWMODE { 0x80000000 } |
|
|
485 | |
|
|
486 | sub PU_RATIO { 0x0000000F } |
|
|
487 | |
|
|
488 | sub PU_FOOD { 0x00000010 } |
|
|
489 | sub PU_DRINK { 0x00000020 } |
|
|
490 | sub PU_VALUABLES { 0x00000040 } |
|
|
491 | sub PU_BOW { 0x00000080 } |
|
|
492 | |
|
|
493 | sub PU_ARROW { 0x00000100 } |
|
|
494 | sub PU_HELMET { 0x00000200 } |
|
|
495 | sub PU_SHIELD { 0x00000400 } |
|
|
496 | sub PU_ARMOUR { 0x00000800 } |
|
|
497 | |
|
|
498 | sub PU_BOOTS { 0x00001000 } |
|
|
499 | sub PU_GLOVES { 0x00002000 } |
|
|
500 | sub PU_CLOAK { 0x00004000 } |
|
|
501 | sub PU_KEY { 0x00008000 } |
|
|
502 | |
|
|
503 | sub PU_MISSILEWEAPON { 0x00010000 } |
|
|
504 | sub PU_ALLWEAPON { 0x00020000 } |
|
|
505 | sub PU_MAGICAL { 0x00040000 } |
|
|
506 | sub PU_POTION { 0x00080000 } |
|
|
507 | |
|
|
508 | sub PU_SPELLBOOK { 0x00100000 } |
|
|
509 | sub PU_SKILLSCROLL { 0x00200000 } |
|
|
510 | sub PU_READABLES { 0x00400000 } |
|
|
511 | sub PU_MAGIC_DEVICE { 0x00800000 } |
|
|
512 | |
|
|
513 | sub PU_NOT_CURSED { 0x01000000 } |
|
|
514 | |
|
|
515 | sub PU_JEWELS { 0x02000000 } |
|
|
516 | |
|
|
517 | |
472 | 1; |
518 | 1; |
473 | |
519 | |
474 | =back |
520 | =back |
475 | |
521 | |
476 | =head1 AUTHOR |
522 | =head1 AUTHOR |