Brown2020 / scripts /runConditionNotice.m
jalauer's picture
Add files using upload-large-folder tool
227148b verified
function trial = runConditionNotice(disp_struct, task_struct, trial, ioObject, LTP1address)
% define the text font
Screen('TextSize', disp_struct.wPtr, 60);
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]);
if trial(task_struct.cTrialCond) == task_struct.FC
% free choice trial
condText = 'Choose';
io64(ioObject,LTP1address,1); WaitSecs(.05); io64(ioObject,LTP1address,0);
else
% no-choice trial
Screen('TextColor', disp_struct.wPtr, [0 0 255]);
condText = 'Match';
io64(ioObject,LTP1address,2); WaitSecs(.05); io64(ioObject,LTP1address,0);
end
DrawFormattedText(disp_struct.wPtr, condText, 'center', 'center');
Screen(disp_struct.wPtr, 'Flip');
WaitSecs(0.5);
% clear
Screen(disp_struct.wPtr, 'Flip');
Screen('TextColor', disp_struct.wPtr, [255 255 255]);
end % function