5 // Created by Sam McCall on 5/05/09.
8 @implementation JSActionButton {
15 - (id)initWithName:(NSString *)name_ idx:(int)idx max:(int)max_ {
16 if ((self = [super init])) {
20 self.name = [NSString stringWithFormat:@"Button %d - %@", self.index + 1, name_];
22 self.name = [NSString stringWithFormat:@"Button %d", self.index + 1];
27 - (id)findSubActionForValue:(IOHIDValueRef)val {
28 return (IOHIDValueGetIntegerValue(val) == max) ? self : nil;
31 - (void)notifyEvent:(IOHIDValueRef)value {
32 active = IOHIDValueGetIntegerValue(value) == max;