From 161fa8af66c57aa6c29f6efa415322b36798ef8f Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Sun, 1 Nov 2009 05:53:44 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34480 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/plugins/DFSound/macsrc/NamedSlider.m | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 macosx/plugins/DFSound/macsrc/NamedSlider.m (limited to 'macosx/plugins/DFSound/macsrc/NamedSlider.m') diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.m b/macosx/plugins/DFSound/macsrc/NamedSlider.m new file mode 100644 index 00000000..fd07780a --- /dev/null +++ b/macosx/plugins/DFSound/macsrc/NamedSlider.m @@ -0,0 +1,33 @@ +#import "NamedSlider.h" + +@implementation NamedSlider + +- (void)dealloc +{ + [strings release]; + [super dealloc]; +} + +- (void)setStrings:(NSArray *)theStrings +{ + [strings release]; + strings = [theStrings retain]; +} + +- (NSString *)stringValue +{ + int index = [self intValue]; + + if (index >= 0 && index < [strings count]) + return [strings objectAtIndex:index]; + + return @"(Unknown)"; +} + +- (void)setIntValue:(int)value +{ + [super setIntValue:value]; + [self sendAction:[self action] to:[self target]]; +} + +@end -- cgit v1.2.3