Page History: Text Element
Compare Page Revisions
Page Revision: 2013/07/24 16:50
|
Text Element
|
Info |
Category: |
Visual Stimuli |
|
AddIn: |
Base Elements |
Creator: |
OkazoLab Team |
|
Scope: |
Parent Event |
Owns Snippets: |
no |
|
Usage: |
Runtime Screen,Snippets |
Text element allows displaying text blocks for instructions and feedback. Element provides a variety of text decoration options, e.g. font, color and alignment selection. The text content can always be changed and reformatted at runtime.
Snapshots
Text element in the EventIDE scene editor | Multiple textblocks with different fonts (inluding the symbol font), colors and visual effects applied | Multiple textblocks making an instruction screen |
Practical Use
Creating a single textblock on a visual scene
- Select Event where you want to place a textblock
- Add Text Element into that event, the element will appear at the center of the screen
- Select the element in the Element List
- Edit the Text property of the element in the Property Panel. Use the return key to add new lines.
- Adjust the size of element's rendering area in the Scene Editor with the mouse. Alternatevly, set the uniform font size by adjusting the AutoSize property.
- Change the font, color and text alignment of the elementif nessesary, with the corresponding properties in the Property Panel
- Adjust element's screen position, if nessesary
Using the text element for delivering visual feedback
- Add Text Element into a feedback event.
- Create a Proxy Variable, for example, called FeedbackText, linked to the Text property of the element.
- Add the following code into any snippet called before activation of the feedback event in each trial (Snippet suggestion- OnDeactivated of the previous event or OnActivating of the parent event)
// Check the trial outcome. Result and RT just other user variables
if (Result==true)
{
FeedbackText="Correct";
}
else
{
FeedbackText="Wrong";
}
if (RT>5000)
FeedbackText="Too Late";
Synchronized Internal Actions
Experiment Start | Parent Event Onset | External Trigger / Status Change | Parent Event Offset | Experiment End |
---|
| Gets displayed on screen | | Is removed from screen | |
Notes
If you use the transparent background in the parent event and the global backgound is bright, then you may discover that a tiny border around the text is rendered by the Text Element. To prevent this rendering issue from happening you can either set a solid background for the parent event or switch-off the antialiasing in properties of Text Element.
Generic Properties
Name | Description | Constraints | Value Type | Upon Runtime Change |
---|
VISUAL APPEARANCE |
Text | Multi-line string value that defines a text rendered by the element. Type your text here. Use Enter press to initiate a new text line. | | String | |
Font Color | Color of the text | | stColor | |
Auto size | If true, the text rendering area is resized automatically when the text is changed | | Boolean | |
Font name | Defines the font for the text. Select a font from the list. | | Font, String | |
Font Size | The size of the font | | Double | |
Text alignment | Horizontal text alignment inside of a text area. | | TextAligment | |
+=== Properties inherited from clVisualElement ===
Name | Description | Constraints | Value Type | Upon Runtime Change |
---|
VISUAL APPEARANCE |
Alpha Masking | Defines whether the visual content rendered by this element will be used as an opacity mask which is applied onto the given event surface. The active opacity mask allows one to expose pixels of the parent event surface through a solid background of the given event. If the value is true, the darker pixels of the content will make more transparent holes on the entire event surface. | | Boolean | |
AntiAliasing | If true, the rendered content will be anti-aliased for smoother visual appearance. If false, rendering will be authentic to its source, e.g. a bitmap. | | Boolean | |
Position | Defines the position of the element viewport on the screen. The position can be set in any of three coordinate systems: a) pixels, b) polar, c) central. | | clPoint | |
Size | Defines the size of the element viewport on the screen. The size can be set in any of three coordinate systems: a) pixels, b) visual degrees, c) 'relative-to-screen' size. | | clSize | |
Z Order | Indicates the current depth order of the element viewport on the surface of the parent event. The greatest number corresponds to the top position. The order can be changed by moving the element up and down in the element list. | | Int32 | |
Pivot Point | Defines the pivot point (coordinate and the rotation centers) within the element viewport. | | stAlignment or Int32 | |
Visible | Defines whether the element is currently visible on the event surface. The property is convenient for switching visual content on and off. | | Boolean | |
Rotation | Defines the rotation angle (in degrees) of element viewport relative to the its pivot point. | | Double in the range 0..360 | |
EFFECTS |
Transparent Color | The color of the original pixels of rendered content that will be set as transparent. | | stColor | |
Transparency Tolerance | Tolerance ratio for choosing colors that become transparent. Zero means that effect is not applied, 1 denotes that all colors will become trasparent. | | Int32, range (0..100) | |
Color Mask | Produces a multiplicative combination of the original pixels and the selected mask color (except the alpha channel). The effect emulates a look through a colored glass. White or transparent mask color doesn't change the original pixels. | | stColor | |
Opacity | Opacity of the rendered content. | | Int32, range (0..100) | |
Contrast | Contrast of the rendered content. | | Int32, range (-100..100) | |
Brightness | Defines the brighness of the rendered content. | | Int32, range (-100..100) | |
Saturation | Saturation of the rendered content. | | Double | |
Pixelation | Defines the pixel scale of the rendering. | | Int32, range (0..100) | |
Blurring | The radius used in the gaussian blur of rendered content, as a pixel-based factor. The default is 0 which means no blurring. | | Int32 | |
POSITIONAL JITTER |
Reset Jitter | Set to true at runtime to reset the current positional jitter. | | Boolean, set true for action | |
Current Jitter | Jitter range, in pixels (non inclusive). | . | clSize | |
Jitter Range | Jitter range, centered at the original position of the element. | . | clSize | |
+=== Properties inherited from clElement ===
Inherited properties of clElement
Name | Description | Constraints | Value Type | Upon Change |
---|
Control |
Is Enabled | If set to false the element is completely omitted when the experiment is run. | | Boolean |
|
Title | Title of the element. | | String |
|