Brown2020 / scripts /train_Inst4.m
jalauer's picture
Add files using upload-large-folder tool
227148b verified
function [] = train_Inst4(disp_struct)
% the outline task instructions
text_0 = '-Instructions-\n\n\n';
text_1 = 'OK - here''s an interesting twist: \n\n On some trials, one of the picture will be selected for you and will be framed in blue. These are called ''Match'' trials.\n\n On ''Match'' trials, you must select the framed picture.\n\n\n\n';
text_2 = 'On other trials you will be free to choose either picture.\n\n These are called ''Choose'' 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 );
% 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