pcsxr-1.9.92
[pcsx_rearmed.git] / macosx / plugins / DFSound / macsrc / NamedSlider.m
1 #import "NamedSlider.h"
2
3 @implementation NamedSlider
4
5 - (void)dealloc
6 {
7         [strings release];
8         [super dealloc];
9 }
10
11 - (void)setStrings:(NSArray *)theStrings
12 {
13         [strings release];
14         strings = [theStrings retain];
15 }
16
17 - (NSString *)stringValue
18 {
19         int index = [self intValue];
20         
21         if (index >= 0 && index < [strings count])
22                 return [strings objectAtIndex:index];
23         
24         return @"(Unknown)";
25 }
26
27 - (void)setIntValue:(int)value
28 {
29         [super setIntValue:value];
30         [self sendAction:[self action] to:[self target]];
31 }
32
33 @end