Oolite
Loading...
Searching...
No Matches
PlayerEntity(StickMapperInternal) Category Reference

Instance Methods

(void) - resetStickFunctions
 
(void) - checkCustomEquipButtons:ignore:
 
(void) - removeFunction:
 
(NSArray *) - stickFunctionList
 
(void) - displayFunctionList:skip:
 
(NSString *) - describeStickDict:
 
(NSString *) - hwToString:
 

Detailed Description

Definition at line 33 of file PlayerEntityStickMapper.m.

Method Documentation

◆ checkCustomEquipButtons:ignore:

- (void) checkCustomEquipButtons: (NSDictionary *)  stickFn
ignore: (int idx 

Extends class PlayerEntity.

Definition at line 1 of file PlayerEntityStickMapper.m.

317 :(NSDictionary *)stickFn ignore:(int)idx
318{
319 int i;
320 for (i = 0; i < [customEquipActivation count]; i++)
321 {
322 if (i != idx) {
323 NSMutableDictionary *custEquip = [[customEquipActivation objectAtIndex:i] mutableCopy];
324 NSDictionary *bf = [[customEquipActivation objectAtIndex:i] objectForKey:CUSTOMEQUIP_BUTTONACTIVATE];
325 if ([bf oo_integerForKey:STICK_NUMBER] == [stickFn oo_integerForKey:STICK_NUMBER] &&
326 [bf oo_integerForKey:STICK_AXBUT] == [stickFn oo_integerForKey:STICK_AXBUT] &&
327 [custEquip objectForKey:CUSTOMEQUIP_BUTTONACTIVATE])
328 {
329 [custEquip removeObjectForKey:CUSTOMEQUIP_BUTTONACTIVATE];
330 }
331 bf = [[customEquipActivation objectAtIndex:i] objectForKey:CUSTOMEQUIP_BUTTONMODE];
332 if ([bf oo_integerForKey:STICK_NUMBER] == [stickFn oo_integerForKey:STICK_NUMBER] &&
333 [bf oo_integerForKey:STICK_AXBUT] == [stickFn oo_integerForKey:STICK_AXBUT] &&
334 [custEquip objectForKey:CUSTOMEQUIP_BUTTONMODE])
335 {
336 [custEquip removeObjectForKey:CUSTOMEQUIP_BUTTONMODE];
337 }
338 [customEquipActivation replaceObjectAtIndex:i withObject:custEquip];
339 [custEquip release];
340 }
341 }
342}
#define STICK_NUMBER
#define STICK_AXBUT
#define CUSTOMEQUIP_BUTTONACTIVATE
#define CUSTOMEQUIP_BUTTONMODE
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque

◆ describeStickDict:

- (NSString *) describeStickDict: (NSDictionary *)  stickDict

Extends class PlayerEntity.

Definition at line 1 of file PlayerEntityStickMapper.m.

539 : (NSDictionary *)stickDict
540{
541 NSString *desc=nil;
542 if(stickDict)
543 {
544 int thingNumber=[(NSNumber *)[stickDict objectForKey: STICK_AXBUT]
545 intValue];
546 int stickNumber=[(NSNumber *)[stickDict objectForKey: STICK_NUMBER]
547 intValue];
548 // Button or axis?
549 if([(NSNumber *)[stickDict objectForKey: STICK_ISAXIS] boolValue])
550 {
551 desc=[NSString stringWithFormat: @"Stick %d axis %d",
552 stickNumber+1, thingNumber+1];
553 }
554 else if(thingNumber >= MAX_REAL_BUTTONS)
555 {
556 static const char dir[][6] = { "up", "right", "down", "left" };
557 desc=[NSString stringWithFormat: @"Stick %d hat %d %s",
558 stickNumber+1, (thingNumber - MAX_REAL_BUTTONS) / 4 + 1,
559 dir[thingNumber & 3]];
560 }
561 else
562 {
563 desc=[NSString stringWithFormat: @"Stick %d button %d",
564 stickNumber+1, thingNumber+1];
565 }
566 }
567 return desc;
568}
#define MAX_REAL_BUTTONS
return nil

◆ displayFunctionList:skip:

- (void) displayFunctionList: (GuiDisplayGen *)  gui
skip: (NSUInteger)  skip 

Extends class PlayerEntity.

Definition at line 1 of file PlayerEntityStickMapper.m.

404 :(GuiDisplayGen *)gui
405 skip:(NSUInteger)skip
406{
408
409 [gui setColor:[OOColor greenColor] forRow: GUI_ROW_HEADING];
410 [gui setArray:[NSArray arrayWithObjects:
411 @"Function", @"Assigned to", @"Type", nil]
412 forRow:GUI_ROW_HEADING];
413
414 if(!stickFunctions)
415 {
416 stickFunctions = [[self stickFunctionList] retain];
417 }
418 NSDictionary *assignedAxes = [stickHandler axisFunctions];
419 NSDictionary *assignedButs = [stickHandler buttonFunctions];
420
421 NSUInteger i, n_functions = [stickFunctions count];
422 NSInteger n_rows, start_row, previous = 0;
423
424 if (skip >= n_functions)
425 skip = n_functions - 1;
426
427 if (n_functions < MAX_ROWS_FUNCTIONS)
428 {
429 skip = 0;
430 previous = 0;
431 n_rows = MAX_ROWS_FUNCTIONS;
432 start_row = GUI_ROW_FUNCSTART;
433 }
434 else
435 {
436 n_rows = MAX_ROWS_FUNCTIONS - 1;
437 start_row = GUI_ROW_FUNCSTART;
438 if (skip > 0)
439 {
440 n_rows -= 1;
441 start_row += 1;
442 if (skip > MAX_ROWS_FUNCTIONS)
443 previous = skip - (MAX_ROWS_FUNCTIONS - 2);
444 else
445 previous = 0;
446 }
447 }
448
449 if (n_functions > 0)
450 {
451 if (skip > 0)
452 {
453 [gui setColor:[OOColor greenColor] forRow:GUI_ROW_FUNCSTART];
454 [gui setArray:[NSArray arrayWithObjects:DESC(@"gui-back"), @" <-- ", nil] forRow:GUI_ROW_FUNCSTART];
455 [gui setKey:[NSString stringWithFormat:@"More:%lld", previous] forRow:GUI_ROW_FUNCSTART];
456 }
457
458 for(i=0; i < (n_functions - skip) && (int)i < n_rows; i++)
459 {
460 NSDictionary *entry = [stickFunctions objectAtIndex: i + skip];
461 if ([entry objectForKey:KEY_HEADER]) {
462 NSString *header = [entry objectForKey:KEY_HEADER];
463 [gui setArray:[NSArray arrayWithObjects:header, @"", @"", nil] forRow:i + start_row];
464 [gui setColor:[OOColor cyanColor] forRow:i + start_row];
465 }
466 else
467 {
468 NSString *allowedThings;
469 NSString *assignment;
470 NSString *axFuncKey = [entry oo_stringForKey:KEY_AXISFN];
471 NSString *butFuncKey = [entry oo_stringForKey:KEY_BUTTONFN];
472 int allowable = [entry oo_intForKey:KEY_ALLOWABLE];
473 switch(allowable)
474 {
475 case HW_AXIS:
476 allowedThings=@"Axis";
477 assignment=[self describeStickDict:
478 [assignedAxes objectForKey: axFuncKey]];
479 break;
480 case HW_BUTTON:
481 allowedThings=@"Button";
482 int bf = [butFuncKey integerValue];
483 if (bf < 10000)
484 {
485 assignment=[self describeStickDict:
486 [assignedButs objectForKey: butFuncKey]];
487 }
488 else
489 {
490 NSString *key = CUSTOMEQUIP_BUTTONACTIVATE;
491 bf -= 10000;
492 if (bf >= 10000)
493 {
494 bf -= 10000;
496 }
497 assignment=[self describeStickDict:
498 [[customEquipActivation objectAtIndex:bf] objectForKey:key]];
499 }
500 break;
501 default:
502 allowedThings=@"Axis/Button";
503
504 // axis has priority
505 assignment=[self describeStickDict:
506 [assignedAxes objectForKey: axFuncKey]];
507 if(!assignment)
508 assignment=[self describeStickDict:
509 [assignedButs objectForKey: butFuncKey]];
510 }
511
512 // Find out what's assigned for this function currently.
513 if (assignment == nil)
514 {
515 assignment = @" - ";
516 }
517
518 [gui setArray: [NSArray arrayWithObjects:
519 [entry objectForKey: KEY_GUIDESC], assignment, allowedThings, nil]
520 forRow: i + start_row];
521 //[gui setKey: GUI_KEY_OK forRow: i + start_row];
522 [gui setKey: [NSString stringWithFormat: @"Index:%llu", i + skip] forRow: i + start_row];
523 }
524 }
525 if (i < n_functions - skip)
526 {
527 [gui setColor: [OOColor greenColor] forRow: start_row + i];
528 [gui setArray: [NSArray arrayWithObjects: DESC(@"gui-more"), @" --> ", nil] forRow: start_row + i];
529 [gui setKey: [NSString stringWithFormat: @"More:%llu", n_rows + skip] forRow: start_row + i];
530 i++;
531 }
532
533 [gui setSelectableRange: NSMakeRange(GUI_ROW_STICKPROFILE, i + start_row - GUI_ROW_STICKPROFILE)];
534 }
535
536}
#define HW_BUTTON
#define HW_AXIS
#define KEY_HEADER
#define MAX_ROWS_FUNCTIONS
#define GUI_ROW_FUNCSTART
void setSelectableRange:(NSRange range)
void setColor:forRow:(OOColor *color,[forRow] OOGUIRow row)
void setArray:forRow:(NSArray *arr,[forRow] OOGUIRow row)
void setKey:forRow:(NSString *str,[forRow] OOGUIRow row)
OOColor * cyanColor()
Definition OOColor.m:286
OOColor * greenColor()
Definition OOColor.m:274
NSDictionary * buttonFunctions()
NSDictionary * axisFunctions()

◆ hwToString:

- (NSString *) hwToString: (int hwFlags

Extends class PlayerEntity.

Definition at line 1 of file PlayerEntityStickMapper.m.

571 : (int)hwFlags
572{
573 NSString *hwString;
574 switch(hwFlags)
575 {
576 case HW_AXIS:
577 hwString = @"axis";
578 break;
579 case HW_BUTTON:
580 hwString = @"button";
581 break;
582 default:
583 hwString = @"axis/button";
584 }
585 return hwString;
586}

◆ removeFunction:

- (void) removeFunction: (int selFunctionIdx

Extends class PlayerEntity.

Definition at line 1 of file PlayerEntityStickMapper.m.

345 :(int)idx
346{
348 NSDictionary *entry = [stickFunctions objectAtIndex:idx];
349 NSNumber *butfunc = [entry objectForKey:KEY_BUTTONFN];
350 NSNumber *axfunc = [entry objectForKey:KEY_AXISFN];
351 BOOL custom = NO;
352 selFunctionIdx = idx;
353
354 // Some things can have either axis or buttons - make sure we clear
355 // both!
356 if(butfunc)
357 {
358 // special case for OXP equipment buttons
359 if ([butfunc intValue] >= 10000)
360 {
361 int bf = [butfunc intValue];
362 custom = YES;
363 NSString *key = CUSTOMEQUIP_BUTTONACTIVATE;
364 bf -= 10000;
365 if (bf >= 10000)
366 {
367 bf -= 10000;
369 }
370 NSMutableDictionary *custEquip = [[customEquipActivation objectAtIndex:bf] mutableCopy];
371 if ([key isEqualToString:CUSTOMEQUIP_BUTTONACTIVATE] && [custEquip objectForKey:CUSTOMEQUIP_BUTTONACTIVATE]) [custEquip removeObjectForKey:key];
372 if ([key isEqualToString:CUSTOMEQUIP_BUTTONMODE] && [custEquip objectForKey:CUSTOMEQUIP_BUTTONMODE]) [custEquip removeObjectForKey:key];
373 [customEquipActivation replaceObjectAtIndex:bf withObject:custEquip];
374 [custEquip release];
375 }
376 else
377 {
378 [stickHandler unsetButtonFunction:[butfunc intValue]];
379 }
380 }
381 if(axfunc)
382 {
383 [stickHandler unsetAxisFunction:[axfunc intValue]];
384 }
385 if (!custom)
386 {
387 [stickHandler saveStickSettings];
388 }
389 else
390 {
391 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
392 [defaults setObject:customEquipActivation forKey:KEYCONFIG_CUSTOMEQUIP];
393 }
394
395 unsigned skip;
396 if (selFunctionIdx < MAX_ROWS_FUNCTIONS - 1)
397 skip = 0;
398 else
399 skip = ((selFunctionIdx - 1) / (MAX_ROWS_FUNCTIONS - 2)) * (MAX_ROWS_FUNCTIONS - 2) + 1;
400 [self setGuiToStickMapperScreen: skip];
401}
void unsetButtonFunction:(int function)
void unsetAxisFunction:(int function)

◆ resetStickFunctions

- (void) resetStickFunctions

Extends class PlayerEntity.

Definition at line 1 of file PlayerEntityStickMapper.m.

50{
51 [stickFunctions release];
52 stickFunctions = nil;
53}

◆ stickFunctionList

- (NSArray *) stickFunctionList

Extends class PlayerEntity.

Definition at line 1 of file PlayerEntityStickMapper.m.

592{
593 NSMutableArray *funcList = [NSMutableArray array];
594
595 // propulsion
596 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-propulsion")]];
597 [funcList addObject:
598 [self makeStickGuiDict:DESC(@"stickmapper-roll")
599 allowable:HW_AXIS
600 axisfn:AXIS_ROLL
601 butfn:STICK_NOFUNCTION]];
602 [funcList addObject:
603 [self makeStickGuiDict:DESC(@"stickmapper-pitch")
604 allowable:HW_AXIS
605 axisfn:AXIS_PITCH
606 butfn:STICK_NOFUNCTION]];
607 [funcList addObject:
608 [self makeStickGuiDict:DESC(@"stickmapper-yaw")
609 allowable:HW_AXIS
610 axisfn:AXIS_YAW
611 butfn:STICK_NOFUNCTION]];
612 [funcList addObject:
613 [self makeStickGuiDict:DESC(@"stickmapper-increase-thrust")
614 allowable:HW_AXIS|HW_BUTTON
615 axisfn:AXIS_THRUST
616 butfn:BUTTON_INCTHRUST]];
617 [funcList addObject:
618 [self makeStickGuiDict:DESC(@"stickmapper-decrease-thrust")
619 allowable:HW_AXIS|HW_BUTTON
620 axisfn:AXIS_THRUST
621 butfn:BUTTON_DECTHRUST]];
622 [funcList addObject:
623 [self makeStickGuiDict:DESC(@"stickmapper-fuel-injection")
624 allowable:HW_BUTTON
625 axisfn:STICK_NOFUNCTION
626 butfn:BUTTON_FUELINJECT]];
627 [funcList addObject:
628 [self makeStickGuiDict:DESC(@"stickmapper-hyperspeed")
629 allowable:HW_BUTTON
630 axisfn:STICK_NOFUNCTION
631 butfn:BUTTON_HYPERSPEED]];
632 [funcList addObject:
633 [self makeStickGuiDict:DESC(@"stickmapper-hyperdrive")
634 allowable:HW_BUTTON
635 axisfn:STICK_NOFUNCTION
636 butfn:BUTTON_HYPERDRIVE]];
637 [funcList addObject:
638 [self makeStickGuiDict:DESC(@"stickmapper-gal-hyperdrive")
639 allowable:HW_BUTTON
640 axisfn:STICK_NOFUNCTION
641 butfn:BUTTON_GALACTICDRIVE]];
642
643 [funcList addObject:
644 [self makeStickGuiDict:DESC(@"stickmapper-roll/pitch-precision-toggle")
645 allowable:HW_BUTTON
646 axisfn:STICK_NOFUNCTION
647 butfn:BUTTON_PRECISION]];
648
649 // navigation
650 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-navigation")]];
651 [funcList addObject:
652 [self makeStickGuiDict:DESC(@"stickmapper-compass-mode-next")
653 allowable:HW_BUTTON
654 axisfn:STICK_NOFUNCTION
655 butfn:BUTTON_COMPASSMODE]];
656 [funcList addObject:
657 [self makeStickGuiDict:DESC(@"stickmapper-compass-mode-prev")
658 allowable:HW_BUTTON
659 axisfn:STICK_NOFUNCTION
660 butfn:BUTTON_COMPASSMODE_PREV]];
661 [funcList addObject:
662 [self makeStickGuiDict:DESC(@"stickmapper-scanner-zoom")
663 allowable:HW_BUTTON
664 axisfn:STICK_NOFUNCTION
665 butfn:BUTTON_SCANNERZOOM]];
666 [funcList addObject:
667 [self makeStickGuiDict:DESC(@"stickmapper-scanner-unzoom")
668 allowable:HW_BUTTON
669 axisfn:STICK_NOFUNCTION
670 butfn:BUTTON_SCANNERUNZOOM]];
671 [funcList addObject:
672 [self makeStickGuiDict:DESC(@"stickmapper-view-forward")
673 allowable:HW_AXIS|HW_BUTTON
674 axisfn:AXIS_VIEWY
675 butfn:BUTTON_VIEWFORWARD]];
676 [funcList addObject:
677 [self makeStickGuiDict:DESC(@"stickmapper-view-aft")
678 allowable:HW_AXIS|HW_BUTTON
679 axisfn:AXIS_VIEWY
680 butfn:BUTTON_VIEWAFT]];
681 [funcList addObject:
682 [self makeStickGuiDict:DESC(@"stickmapper-view-port")
683 allowable:HW_AXIS|HW_BUTTON
684 axisfn:AXIS_VIEWX
685 butfn:BUTTON_VIEWPORT]];
686 [funcList addObject:
687 [self makeStickGuiDict:DESC(@"stickmapper-view-starboard")
688 allowable:HW_AXIS|HW_BUTTON
689 axisfn:AXIS_VIEWX
690 butfn:BUTTON_VIEWSTARBOARD]];
691 [funcList addObject:
692 [self makeStickGuiDict:DESC(@"stickmapper-ext-view-cycle")
693 allowable:HW_BUTTON
694 axisfn:STICK_NOFUNCTION
695 butfn:BUTTON_EXTVIEWCYCLE]];
696 [funcList addObject:
697 [self makeStickGuiDict:DESC(@"stickmapper-toggle-ID")
698 allowable:HW_BUTTON
699 axisfn:STICK_NOFUNCTION
700 butfn:BUTTON_ID]];
701 [funcList addObject:
702 [self makeStickGuiDict:DESC(@"stickmapper-docking-clearance")
703 allowable:HW_BUTTON
704 axisfn:STICK_NOFUNCTION
705 butfn:BUTTON_DOCKINGCLEARANCE]];
706 [funcList addObject:
707 [self makeStickGuiDict:DESC(@"stickmapper-dockcpu")
708 allowable:HW_BUTTON
709 axisfn:STICK_NOFUNCTION
710 butfn:BUTTON_DOCKCPU]];
711 [funcList addObject:
712 [self makeStickGuiDict:DESC(@"stickmapper-dockcpufast")
713 allowable:HW_BUTTON
714 axisfn:STICK_NOFUNCTION
715 butfn:BUTTON_DOCKCPUFAST]];
716 [funcList addObject:
717 [self makeStickGuiDict:DESC(@"stickmapper-docking-music")
718 allowable:HW_BUTTON
719 axisfn:STICK_NOFUNCTION
720 butfn:BUTTON_DOCKINGMUSIC]];
721
722 // offensive
723 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-offensive")]];
724 [funcList addObject:
725 [self makeStickGuiDict:DESC(@"stickmapper-weapons-online-toggle")
726 allowable:HW_BUTTON
727 axisfn:STICK_NOFUNCTION
728 butfn:BUTTON_WEAPONSONLINETOGGLE]];
729 [funcList addObject:
730 [self makeStickGuiDict:DESC(@"stickmapper-primary-weapon")
731 allowable:HW_BUTTON
732 axisfn:STICK_NOFUNCTION
733 butfn:BUTTON_FIRE]];
734 [funcList addObject:
735 [self makeStickGuiDict:DESC(@"stickmapper-secondary-weapon")
736 allowable:HW_BUTTON
737 axisfn:STICK_NOFUNCTION
738 butfn:BUTTON_LAUNCHMISSILE]];
739 [funcList addObject:
740 [self makeStickGuiDict:DESC(@"stickmapper-arm-secondary")
741 allowable:HW_BUTTON
742 axisfn:STICK_NOFUNCTION
743 butfn:BUTTON_ARMMISSILE]];
744 [funcList addObject:
745 [self makeStickGuiDict:DESC(@"stickmapper-disarm-secondary")
746 allowable:HW_BUTTON
747 axisfn:STICK_NOFUNCTION
748 butfn:BUTTON_UNARM]];
749 [funcList addObject:
750 [self makeStickGuiDict:DESC(@"stickmapper-target-nearest-incoming-missile")
751 allowable:HW_BUTTON
752 axisfn:STICK_NOFUNCTION
753 butfn:BUTTON_TARGETINCOMINGMISSILE]];
754 [funcList addObject:
755 [self makeStickGuiDict:DESC(@"stickmapper-cycle-secondary")
756 allowable:HW_BUTTON
757 axisfn:STICK_NOFUNCTION
758 butfn:BUTTON_CYCLEMISSILE]];
759 [funcList addObject:
760 [self makeStickGuiDict:DESC(@"stickmapper-next-target")
761 allowable:HW_BUTTON
762 axisfn:STICK_NOFUNCTION
763 butfn:BUTTON_NEXTTARGET]];
764 [funcList addObject:
765 [self makeStickGuiDict:DESC(@"stickmapper-previous-target")
766 allowable:HW_BUTTON
767 axisfn:STICK_NOFUNCTION
768 butfn:BUTTON_PREVTARGET]];
769
770 // defensive
771 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-defensive")]];
772 [funcList addObject:
773 [self makeStickGuiDict:DESC(@"stickmapper-ECM")
774 allowable:HW_BUTTON
775 axisfn:STICK_NOFUNCTION
776 butfn:BUTTON_ECM]];
777 [funcList addObject:
778 [self makeStickGuiDict:DESC(@"stickmapper-jettison")
779 allowable:HW_BUTTON
780 axisfn:STICK_NOFUNCTION
781 butfn:BUTTON_JETTISON]];
782 [funcList addObject:
783 [self makeStickGuiDict:DESC(@"stickmapper-rotate-cargo")
784 allowable:HW_BUTTON
785 axisfn:STICK_NOFUNCTION
786 butfn:BUTTON_ROTATECARGO]];
787 [funcList addObject:
788 [self makeStickGuiDict:DESC(@"stickmapper-escape-pod")
789 allowable:HW_BUTTON
790 axisfn:STICK_NOFUNCTION
791 butfn:BUTTON_ESCAPE]];
792
793 // oxp special equip
794 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-special-equip")]];
795 [funcList addObject:
796 [self makeStickGuiDict:DESC(@"stickmapper-mfd-select-next")
797 allowable:HW_BUTTON
798 axisfn:STICK_NOFUNCTION
799 butfn:BUTTON_MFDSELECTNEXT]];
800 [funcList addObject:
801 [self makeStickGuiDict:DESC(@"stickmapper-mfd-select-prev")
802 allowable:HW_BUTTON
803 axisfn:STICK_NOFUNCTION
804 butfn:BUTTON_MFDSELECTPREV]];
805 [funcList addObject:
806 [self makeStickGuiDict:DESC(@"stickmapper-mfd-cycle-next")
807 allowable:HW_BUTTON
808 axisfn:STICK_NOFUNCTION
809 butfn:BUTTON_MFDCYCLENEXT]];
810 [funcList addObject:
811 [self makeStickGuiDict:DESC(@"stickmapper-mfd-cycle-prev")
812 allowable:HW_BUTTON
813 axisfn:STICK_NOFUNCTION
814 butfn:BUTTON_MFDCYCLEPREV]];
815 [funcList addObject:
816 [self makeStickGuiDict:DESC(@"stickmapper-prime-equipment")
817 allowable:HW_BUTTON
818 axisfn:STICK_NOFUNCTION
819 butfn:BUTTON_PRIMEEQUIPMENT]];
820 [funcList addObject:
821 [self makeStickGuiDict:DESC(@"stickmapper-prime-prev-equipment")
822 allowable:HW_BUTTON
823 axisfn:STICK_NOFUNCTION
824 butfn:BUTTON_PRIMEEQUIPMENT]];
825 [funcList addObject:
826 [self makeStickGuiDict:DESC(@"stickmapper-activate-equipment")
827 allowable:HW_BUTTON
828 axisfn:STICK_NOFUNCTION
829 butfn:BUTTON_ACTIVATEEQUIPMENT]];
830 [funcList addObject:
831 [self makeStickGuiDict:DESC(@"stickmapper-mode-equipment")
832 allowable:HW_BUTTON
833 axisfn:STICK_NOFUNCTION
834 butfn:BUTTON_MODEEQUIPMENT]];
835 [funcList addObject:
836 [self makeStickGuiDict:DESC(@"stickmapper-fastactivate-a")
837 allowable:HW_BUTTON
838 axisfn:STICK_NOFUNCTION
839 butfn:BUTTON_CLOAK]];
840 [funcList addObject:
841 [self makeStickGuiDict:DESC(@"stickmapper-fastactivate-b")
842 allowable:HW_BUTTON
843 axisfn:STICK_NOFUNCTION
844 butfn:BUTTON_ENERGYBOMB]];
845
846 // misc
847 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-misc")]];
848 [funcList addObject:
849 [self makeStickGuiDict:DESC(@"stickmapper-snapshot")
850 allowable:HW_BUTTON
851 axisfn:STICK_NOFUNCTION
852 butfn:BUTTON_SNAPSHOT]];
853 [funcList addObject:
854 [self makeStickGuiDict:DESC(@"stickmapper-pause")
855 allowable:HW_BUTTON
856 axisfn:STICK_NOFUNCTION
857 butfn:BUTTON_PAUSE]];
858 [funcList addObject:
859 [self makeStickGuiDict:DESC(@"stickmapper-toggle-hud")
860 allowable:HW_BUTTON
861 axisfn:STICK_NOFUNCTION
862 butfn:BUTTON_TOGGLEHUD]];
863 [funcList addObject:
864 [self makeStickGuiDict:DESC(@"stickmapper-comms-log")
865 allowable:HW_BUTTON
866 axisfn:STICK_NOFUNCTION
867 butfn:BUTTON_COMMSLOG]];
868#if OO_FOV_INFLIGHT_CONTROL_ENABLED
869 [funcList addObject:
870 [self makeStickGuiDict:DESC(@"stickmapper-increase-field-of-view")
871 allowable:HW_AXIS|HW_BUTTON
872 axisfn:AXIS_FIELD_OF_VIEW
873 butfn:BUTTON_INC_FIELD_OF_VIEW]];
874 [funcList addObject:
875 [self makeStickGuiDict:DESC(@"stickmapper-decrease-field-of-view")
876 allowable:HW_AXIS|HW_BUTTON
877 axisfn:AXIS_FIELD_OF_VIEW
878 butfn:BUTTON_DEC_FIELD_OF_VIEW]];
879#endif
880 if ([customEquipActivation count] > 0) {
881 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-oxp-equip")]];
882 int i;
883 for (i = 0; i < [customEquipActivation count]; i++)
884 {
885 [funcList addObject:
886 [self makeStickGuiDict:[NSString stringWithFormat: @"Activate '%@'", [[customEquipActivation objectAtIndex:i] oo_stringForKey:CUSTOMEQUIP_EQUIPNAME]]
887 allowable:HW_BUTTON
888 axisfn:STICK_NOFUNCTION
889 butfn:(i+10000)]];
890 [funcList addObject:
891 [self makeStickGuiDict:[NSString stringWithFormat: @"Mode '%@'", [[customEquipActivation objectAtIndex:i] oo_stringForKey:CUSTOMEQUIP_EQUIPNAME]]
892 allowable:HW_BUTTON
893 axisfn:STICK_NOFUNCTION
894 butfn:(i+20000)]];
895 }
896
897 }
898 return funcList;
899}
unsigned count

The documentation for this category was generated from the following file: