File size: 1,675 Bytes
227148b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
function [] = train_Inst5(disp_struct)

    % the outline task instructions
    text_0 = '-Instructions-\n\n\n';
    text_1 = 'Regardless of whether you Choose or Match on each trial,\n\n your goal is to learn which pictures are more rewarding. \n\n\n\n (Doing so will help you later in the task!)\n\n\n\n';
    text_2 = 'The faster you learn which pictures are better,\n\n the faster you will finish!\n\n\n\n';
    text_3 = 'Let''s try a few practice trials.';
    
    Screen('TextSize', disp_struct.wPtr, 30);
    Screen('TextFont', disp_struct.wPtr, 'Times');
    Screen('TextStyle', disp_struct.wPtr, 0);
    Screen('TextColor', disp_struct.wPtr, [255 255 255]);
    Screen('FillRect', disp_struct.wPtr,[0 0 0]);
    % the number of charaters per line
    wrap_length = 70;
    
    % Print out the initial instructions
    
    % Bold the intro
    Screen('TextStyle', disp_struct.wPtr, 1);
    [nx, ny, textbounds] = DrawFormattedText(disp_struct.wPtr, text_0, 'center', 50, [], wrap_length, [], [], 1.25 );
    
    % reset to normal font
    Screen('TextStyle', disp_struct.wPtr, 0);
    [nx, ny, textbounds] = DrawFormattedText(disp_struct.wPtr, text_1, 'center', ny, [], wrap_length, [], [], 1.25 );
    [nx, ny, textbounds] = DrawFormattedText(disp_struct.wPtr, text_2, 'center', ny, [], wrap_length, [], [], 1.25 );
    [nx, ny, textbounds] = DrawFormattedText(disp_struct.wPtr, text_3, 'center', ny, [], wrap_length, [], [], 1.25 );
    
    % flip the screen
    Screen(disp_struct.wPtr, 'Flip');
    WaitSecs(0.5);
    
    % wait for P
    RestrictKeysForKbCheck(KbName('SPACE'));
    % wait for keypress
    KbWait([],2); % Waits for keyboard(any) press
end