And disable it by default in new installations, otherwise leave the setting alone. The disablement setting is shared with the engine setting, so the default should not really change anything, except for new installs. Also, the time/pitch shifting dialog disables itself and displays an obvious notice button, which opens the Rubber Band settings. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
80 lines
1.4 KiB
Objective-C
80 lines
1.4 KiB
Objective-C
//
|
|
// EngineTransformer.m
|
|
// Preferences
|
|
//
|
|
// Created by Christopher Snowhill on 2/11/25.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import "RubberbandEngineTransformer.h"
|
|
|
|
@implementation RubberbandEngineR3Transformer
|
|
+ (Class)transformedValueClass {
|
|
return [NSNumber class];
|
|
}
|
|
+ (BOOL)allowsReverseTransformation {
|
|
return NO;
|
|
}
|
|
|
|
- (id)transformedValue:(id)value {
|
|
if(value == nil) return @(YES);
|
|
|
|
if([value isKindOfClass:[NSString class]]) {
|
|
NSString *stringValue = value;
|
|
if([stringValue isEqualToString:@"disabled"] ||
|
|
[stringValue isEqualToString:@"finer"]) {
|
|
return @(NO);
|
|
}
|
|
}
|
|
|
|
return @(YES);
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation RubberbandEngineEnabledTransformer
|
|
+ (Class)transformedValueClass {
|
|
return [NSNumber class];
|
|
}
|
|
+ (BOOL)allowsReverseTransformation {
|
|
return NO;
|
|
}
|
|
|
|
- (id)transformedValue:(id)value {
|
|
if(value == nil) return @(YES);
|
|
|
|
if([value isKindOfClass:[NSString class]]) {
|
|
NSString *stringValue = value;
|
|
if([stringValue isEqualToString:@"disabled"]) {
|
|
return @(NO);
|
|
}
|
|
}
|
|
|
|
return @(YES);
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation RubberbandEngineHiddenTransformer
|
|
+ (Class)transformedValueClass {
|
|
return [NSNumber class];
|
|
}
|
|
+ (BOOL)allowsReverseTransformation {
|
|
return NO;
|
|
}
|
|
|
|
- (id)transformedValue:(id)value {
|
|
if(value == nil) return @(YES);
|
|
|
|
if([value isKindOfClass:[NSString class]]) {
|
|
NSString *stringValue = value;
|
|
if([stringValue isEqualToString:@"disabled"]) {
|
|
return @(NO);
|
|
}
|
|
}
|
|
|
|
return @(YES);
|
|
}
|
|
|
|
@end
|