diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-11-01 05:53:44 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-11-01 05:53:44 +0000 |
| commit | 161fa8af66c57aa6c29f6efa415322b36798ef8f (patch) | |
| tree | 4ff350370c8fcaac99c808822c57a1a1d30eef0b /macosx/plugins/DFSound/macsrc/NamedSlider.m | |
| parent | 8549d0c54350ee4b08e979c4712f313aba58ff3f (diff) | |
| download | pcsxr-161fa8af66c57aa6c29f6efa415322b36798ef8f.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34480 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFSound/macsrc/NamedSlider.m')
| -rw-r--r-- | macosx/plugins/DFSound/macsrc/NamedSlider.m | 33 |
1 files changed, 33 insertions, 0 deletions
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 |
