MATLAB Python

drawSPTBtextbox

Syntax

drawSPTBtextbox(params, window, style, {label, textbox_bounds, cresp_str})

Description

DRAWSPTBTEXTBOX is used to draw a prompt and corresponding textbox to a window. For example, a common requirement is to present a participant with instructions along with the opportunity to type a response. DRAWSPTBTEXTBOX does this, while also presenting helpful debug info (any correct answers that have been logged will be drawn in faint text inside the text box).

Usage

DRAWSPTBTEXTBOX is usually called by easyFunctions and we therefore haven't yet put much effort into making it easy to call. Parameters are as follows: params: the params structure supplied by easyLaunch. window: token for the window where the graphics will be drawn to. textbox_bounds: boundaries of the textbox, in pixels. label: some text to be drawn above the stimulus (e.g., containing simple instructions). Can be left empty. stim: a string to be drawn, or a file path to an image, audio file or video to be presented. textbox_bounds: any drawing that needs to be done will be attempted outside of this area. cresp_str: [optional] a cell array containing correct answers on this trial (may be left empty). style: [optional] supply the string 'above', 'left', or 'right', or 'below' for the algorithm to draw on the indicated position relative to the textbox. Or, specify 'full' to ignore the textbox and draw full screen (the text box will be printed on top). Defaults to 'above'.