X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=JSActionButton.m;fp=JSActionButton.m;h=0000000000000000000000000000000000000000;hp=7d2572a32a09f4a92c0074eed851fbcdc80975e1;hb=f864d363128de19fc6591b77ae9226b34166d715;hpb=f563321aec9e13b8479ab3b890a9179f095a8b17 diff --git a/JSActionButton.m b/JSActionButton.m deleted file mode 100644 index 7d2572a..0000000 --- a/JSActionButton.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// JSActionButton.m -// Enjoy -// -// Created by Sam McCall on 5/05/09. -// - -#import "JSActionButton.h" - -@implementation JSActionButton { - long _max; -} - -- (id)initWithName:(NSString *)name idx:(int)idx max:(long)max { - if ((self = [super init])) { - _max = max; - if (name.length) - self.name = [NSString stringWithFormat:@"Button %d - %@", idx, name]; - else - self.name = [NSString stringWithFormat:@"Button %d", idx]; - } - return self; -} - -- (id)findSubActionForValue:(IOHIDValueRef)val { - return (IOHIDValueGetIntegerValue(val) == _max) ? self : nil; -} - -- (void)notifyEvent:(IOHIDValueRef)value { - self.active = IOHIDValueGetIntegerValue(value) == _max; -} - -@end