forked from erkyrath/Inform7-IDE-Mac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIFRandomSettings.m
46 lines (34 loc) · 997 Bytes
/
IFRandomSettings.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// IFRandomSettings.m
// Inform-xc2
//
// Created by Andrew Hunter on 17/09/2009.
// Copyright 2009 Andrew Hunter. All rights reserved.
//
#import "IFRandomSettings.h"
@implementation IFRandomSettings
- (id) init {
return [self initWithNibName: @"RandomSettings"];
}
- (NSString*) title {
return [[NSBundle mainBundle] localizedStringForKey: @"Randomness Settings"
value: @"Randomness Settings"
table: nil];
}
// = Setting up =
- (void) updateFromCompilerSettings {
IFCompilerSettings* settings = [self compilerSettings];
[makePredictable setState: [settings nobbleRng]?NSOnState:NSOffState];
}
- (void) setSettings {
IFCompilerSettings* settings = [self compilerSettings];
[settings setNobbleRng: [makePredictable state] == NSOnState];
}
- (BOOL) enableForCompiler: (NSString*) compiler {
// These settings only apply to Natural Inform
if ([compiler isEqualToString: IFCompilerNaturalInform])
return YES;
else
return NO;
}
@end