-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathFractControllerBalmLight.j
More file actions
44 lines (33 loc) · 1.39 KB
/
FractControllerBalmLight.j
File metadata and controls
44 lines (33 loc) · 1.39 KB
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
/*
This file is part of FrACT10, a vision test battery.
© 2021 Michael Bach, bach@uni-freiburg.de, <https://michaelbach.de>
2025-02-26 created class "FractControllerBalmLight" inheriting from "FractController"
*/
@import "FractControllerBalm.j"
@import "SoundManager.j"
@implementation FractControllerBalmLight: FractControllerBalm {
}
- (void) runStart { //console.info("FractControllerBalmLight>runStart");
nAlternatives = 2; nTrials = [Settings nTrials02];
[super runStart];
}
- (void) drawStimulusInRect: (CGRect) dirtyRect forView: (FractView) fractView { //console.info("FractControllerBalmLight>drawStimulusInRect");
trialInfoString = [self composeTrialInfoString];
[self prepareDrawing];
switch(state) {
case kStateDrawBack: break;
case kStateDrawFore://console.info("kStateDrawFore");
[[SoundManager sharedManager] playSound: kSoundTrialStart];
if ([alternativesGenerator currentAlternative] !== 0) {
CGContextSetFillColor(cgc, gColorFore);
CGContextFillRect(cgc, CGRectMake(-viewWidthHalf, -viewHeightHalf, viewWidth, viewHeight));
}
discardKeyEntries = NO; //now allow responding
break;
default: break;
}
CGContextRestoreGState(cgc);
CGContextSetFillColor(cgc, gColorBack);
[super drawStimulusInRect: dirtyRect forView: fractView];
}
@end