Update Text Options: Links & minor code adjustments authored by Fabian Berg's avatar Fabian Berg
......@@ -2,7 +2,7 @@
## showText
function: [newX,newY,textbounds,flipTime] = showText(text, varargin)
function: [newX,newY,textbounds,flipTime] = [showText(text, varargin)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/showText.m)
**Description**
Use this function to plot a text on the presentation window. A wrapper function for the psych function DrawFormattedText that handles the typical Psychophysics Toolbox problems for beginners.
......@@ -47,7 +47,7 @@ Use this function to plot a text on the presentation window. A wrapper function
~~~
**Examples**
~~~
~~~matlab
1. showText('Hello World');
% Draws the string Hello World on the middle of the screen
......@@ -68,7 +68,7 @@ Use this function to plot a text on the presentation window. A wrapper function
## changeTextSettings
function: changeTextSettings(size, spacing)
function: [changeTextSettings(size, spacing)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/changeTextSettings.m)
**Description**
Use this function to change the text size and the spacing between two text lines on the stimulus presentation window. Settings are global settings until this function is called again.
......@@ -82,7 +82,7 @@ Use this function to change the text size and the spacing between two text lines
## showInstructions (human)
function: showInstructions(source,varargin)
function: [showInstructions(source,varargin)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/showInstructions.m)
**Description**
Use this function to display instructions or information to a subject. The text is read out of a text file or entered directly. The user has to press a key to continue the program and the screen is cleared automatically.
......@@ -103,7 +103,7 @@ Use this function to display instructions or information to a subject. The text
~~~
**Examples**
~~~
~~~matlab
1. showInstructions('instruction1.txt')
% displays the text of the given file
......@@ -113,7 +113,7 @@ Use this function to display instructions or information to a subject. The text
## fixationCross
function: fixationCross(varargin)
function: [fixationCross(varargin)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/fixationCross.m)
**Description**
Draws a white fixations cross on the screen and waits specified time
......@@ -128,7 +128,7 @@ Draws a white fixations cross on the screen and waits specified time
~~~
**Examples**
~~~
~~~matlab
1. fixationCross(2);
% Presents the fixation cross for 2 seconds
......@@ -138,7 +138,7 @@ fixationCross(1.5, 'color', [255 0 0]);
## plotScale (human)
function: out = plotScale(duration, text, varargin)
function: out = [plotScale(duration, text, varargin)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/plotScale.m)
**Description**
Use this function to plot a scale on the stimulus presentation window that is highly adjustable.
......@@ -153,8 +153,8 @@ Use this function to plot a scale on the stimulus presentation window that is hi
**Inputs-optional**
~~~
‘x’ position of scale in X with respect to the center of scale, 0% left, 100% right
‘y’ position of scale in Y with respect to the center of scale, 0% top, 100% bottom
‘x’ position of scale in X with respect to the center of scale, 0% --> left, 100% --> right
‘y’ position of scale in Y with respect to the center of scale, 0% --> top, 100% --> bottom
‘width’ width of scale in percent with respect to screen
‘textSize’ text size in pixel
‘penWidth’ pen width in pixel (for scales)
......@@ -185,7 +185,7 @@ Use this function to plot a scale on the stimulus presentation window that is hi
~~~
**Examples**
~~~
~~~matlab
1. out = plotScale(5, {'1', '2', '3', '4', '5'}, 'y', 70, 'color', [255 0 255]);
% Plots a scale in the lower middle of the screen with the values
ranging from 1 to 5. The scale is displayed 5 seconds or until the user responds.
......@@ -196,7 +196,7 @@ Use this function to plot a scale on the stimulus presentation window that is hi
user responds. The command changes the pen width to 5 and the text size to 50.
~~~
![image](uploads/f1a6a47cb52b282623658fe1736d63d1/image.png)
~~~
~~~matlab
3. out = plotScale(inf, {'a','b','c','d','e','f','g'});
% Plots a scale ranging from a to g in the middle of the screen
(default values). The display time is set to infinity. That means the user has to respond.
......@@ -215,7 +215,7 @@ Use this function to plot a scale on the stimulus presentation window that is hi
## startQuestionnaire (human)
function: out = startQuestionnaire(text, ansText, varargin)
function: out = [startQuestionnaire(text, ansText, varargin)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Tools/Questionnaire/startQuestionnaire.m)
**Description**
This is the main function for questionnaires. It needs at least two arguments. In addition startQuestionnaire allows you to modify several optional parameters.
......@@ -258,7 +258,7 @@ varargin ‘mainDiv’ a value in percent that divides the screen vertically int
~~~
**Examples**
~~~
~~~matlab
1. out=startQuestionnaire({What is blue?’, What is salty?’, What is music?’}, {taste,
color, smell, sound});
~~~
......@@ -267,7 +267,7 @@ varargin ‘mainDiv’ a value in percent that divides the screen vertically int
## inputTextBox (human)
function: [text2display, escape] = inputTextBox(varargin)
function: [text2display, escape] = [inputTextBox(varargin)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/inputTextBox.m)
**Description**
This function creates a box that allows the user to type a free defined word or text. The input is terminated by pressing enter. The text is available in MATLAB as a string. Use ESC key to exit function.
......@@ -289,7 +289,7 @@ This function creates a box that allows the user to type a free defined word or
## cleanConfigCache
function: cleanFontConfigCache
function: [cleanFontConfigCache](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Tools/cleanFontConfigCache.m)
**Description**
This function cleans the font config cache of GStreamer. Call this function if text rendering takes a very long time! Should not be called from within an experiment.
\ No newline at end of file