source: trunk/macosx/SpeedLimitToTurtleIconTransformer.m @ 1125

Last change on this file since 1125 was 1080, checked in by livings124, 15 years ago

use bindings for speed limit

File size: 571 bytes
Line 
1
2#import "SpeedLimitToTurtleIconTransformer.h"
3
4@implementation SpeedLimitToTurtleIconTransformer
5
6+ (Class) transformedValueClass
7{
8    return [NSImage class];
9}
10
11+ (BOOL) allowsReverseTransformation
12{
13    return NO;
14}
15
16- (id) transformedValue: (id) value
17{
18    if (!value)
19        return nil;
20   
21    return [value boolValue] ? ([NSColor currentControlTint] == NSBlueControlTint
22            ? [NSImage imageNamed: @"SpeedLimitButtonBlue.png"] : [NSImage imageNamed: @"SpeedLimitButtonGraphite.png"])
23            : [NSImage imageNamed: @"SpeedLimitButton.png"];
24}
25
26@end
Note: See TracBrowser for help on using the repository browser.