diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-10-31 15:48:52 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-10-31 15:48:52 +0000 |
| commit | d4e4912b5bd1f70022567abc3df880f32e174567 (patch) | |
| tree | b6797f8ec1278c53f22b71197706a661880d14b4 /macosx/plugins/PeopsSpu109/macsrc/NamedSlider.m | |
| parent | e719dae71d52983edb311fa29fb88a01220547ec (diff) | |
| download | pcsxr-d4e4912b5bd1f70022567abc3df880f32e174567.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34345 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/PeopsSpu109/macsrc/NamedSlider.m')
| -rw-r--r-- | macosx/plugins/PeopsSpu109/macsrc/NamedSlider.m | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/macosx/plugins/PeopsSpu109/macsrc/NamedSlider.m b/macosx/plugins/PeopsSpu109/macsrc/NamedSlider.m new file mode 100644 index 00000000..fd07780a --- /dev/null +++ b/macosx/plugins/PeopsSpu109/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 |
