Oolite 1.91.0.7645-241119-222d325
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.

316 :(NSDictionary *)stickFn ignore:(int)idx
317{
318 int i;
319 for (i = 0; i < [customEquipActivation count]; i++)
320 {
321 if (i != idx) {
322 NSDictionary *bf = [[customEquipActivation objectAtIndex:i] objectForKey:CUSTOMEQUIP_BUTTONACTIVATE];
323 if ([bf oo_integerForKey:STICK_NUMBER] == [stickFn oo_integerForKey:STICK_NUMBER] &&
324 [bf oo_integerForKey:STICK_AXBUT] == [stickFn oo_integerForKey:STICK_AXBUT])
325 {
326 [[customEquipActivation objectAtIndex:i] removeObjectForKey:CUSTOMEQUIP_BUTTONACTIVATE];
327 }
328 bf = [[customEquipActivation objectAtIndex:i] objectForKey:CUSTOMEQUIP_BUTTONMODE];
329 if ([bf oo_integerForKey:STICK_NUMBER] == [stickFn oo_integerForKey:STICK_NUMBER] &&
330 [bf oo_integerForKey:STICK_AXBUT] == [stickFn oo_integerForKey:STICK_AXBUT])
331 {
332 [[customEquipActivation objectAtIndex:i] removeObjectForKey:CUSTOMEQUIP_BUTTONMODE];
333 }
334 }
335 }
336}
#define STICK_NUMBER
#define STICK_AXBUT
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.

529 : (NSDictionary *)stickDict
530{
531 NSString *desc=nil;
532 if(stickDict)
533 {
534 int thingNumber=[(NSNumber *)[stickDict objectForKey: STICK_AXBUT]
535 intValue];
536 int stickNumber=[(NSNumber *)[stickDict objectForKey: STICK_NUMBER]
537 intValue];
538 // Button or axis?
539 if([(NSNumber *)[stickDict objectForKey: STICK_ISAXIS] boolValue])
540 {
541 desc=[NSString stringWithFormat: @"Stick %d axis %d",
542 stickNumber+1, thingNumber+1];
543 }
544 else if(thingNumber >= MAX_REAL_BUTTONS)
545 {
546 static const char dir[][6] = { "up", "right", "down", "left" };
547 desc=[NSString stringWithFormat: @"Stick %d hat %d %s",
548 stickNumber+1, (thingNumber - MAX_REAL_BUTTONS) / 4 + 1,
549 dir[thingNumber & 3]];
550 }
551 else
552 {
553 desc=[NSString stringWithFormat: @"Stick %d button %d",
554 stickNumber+1, thingNumber+1];
555 }
556 }
557 return desc;
558}
#define STICK_ISAXIS
#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.

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

561 : (int)hwFlags
562{
563 NSString *hwString;
564 switch(hwFlags)
565 {
566 case HW_AXIS:
567 hwString = @"axis";
568 break;
569 case HW_BUTTON:
570 hwString = @"button";
571 break;
572 default:
573 hwString = @"axis/button";
574 }
575 return hwString;
576}

◆ removeFunction:

- (void) removeFunction: (int) selFunctionIdx

Extends class PlayerEntity.

Definition at line 1 of file PlayerEntityStickMapper.m.

339 :(int)idx
340{
342 NSDictionary *entry = [stickFunctions objectAtIndex:idx];
343 NSNumber *butfunc = [entry objectForKey:KEY_BUTTONFN];
344 NSNumber *axfunc = [entry objectForKey:KEY_AXISFN];
345 BOOL custom = NO;
346 selFunctionIdx = idx;
347
348 // Some things can have either axis or buttons - make sure we clear
349 // both!
350 if(butfunc)
351 {
352 // special case for OXP equipment buttons
353 if ([butfunc intValue] >= 10000)
354 {
355 int bf = [butfunc intValue];
356 custom = YES;
357 NSString *key = CUSTOMEQUIP_BUTTONACTIVATE;
358 bf -= 10000;
359 if (bf >= 10000)
360 {
361 bf -= 10000;
363 }
364 [[customEquipActivation objectAtIndex:bf] removeObjectForKey:key];
365 }
366 else
367 {
368 [stickHandler unsetButtonFunction:[butfunc intValue]];
369 }
370 }
371 if(axfunc)
372 {
373 [stickHandler unsetAxisFunction:[axfunc intValue]];
374 }
375 if (!custom)
376 {
377 [stickHandler saveStickSettings];
378 }
379 else
380 {
381 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
382 [defaults setObject:customEquipActivation forKey:KEYCONFIG_CUSTOMEQUIP];
383 }
384
385 unsigned skip;
386 if (selFunctionIdx < MAX_ROWS_FUNCTIONS - 1)
387 skip = 0;
388 else
389 skip = ((selFunctionIdx - 1) / (MAX_ROWS_FUNCTIONS - 2)) * (MAX_ROWS_FUNCTIONS - 2) + 1;
390 [self setGuiToStickMapperScreen: skip];
391}
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.

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

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