5 // Created by Sam McCall on 5/05/09.
8 #import "JSActionButton.h"
10 @implementation JSActionButton {
17 - (id)initWithName:(NSString *)name_ idx:(int)idx max:(int)max_ {
18 if ((self = [super init])) {
21 self.name = [NSString stringWithFormat:@"Button %d - %@", idx, name_];
23 self.name = [NSString stringWithFormat:@"Button %d", idx];
28 - (id)findSubActionForValue:(IOHIDValueRef)val {
29 return (IOHIDValueGetIntegerValue(val) == max) ? self : nil;
32 - (void)notifyEvent:(IOHIDValueRef)value {
33 active = IOHIDValueGetIntegerValue(value) == max;