Difference between revisions of "Text"
Jump to navigation
Jump to search
(Created page with "{{UI Object Header}} Shows a generic text. == Parameters == *'''id''': the object's ID, used by UISets. Required *'''position''': the object's position. Use the pixels or row...") |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
*'''id''': the object's ID, used by UISets. Required | *'''id''': the object's ID, used by UISets. Required | ||
*'''position''': the object's position. Use the pixels or rows and columns coordinates format | *'''position''': the object's position. Use the pixels or rows and columns coordinates format | ||
− | |||
*'''text''': the text. Can contain HTML tags | *'''text''': the text. Can contain HTML tags | ||
*'''css''': optional, and defines the CSS style | *'''css''': optional, and defines the CSS style | ||
+ | *'''template''': optional, html template to be used for each item | ||
== Syntax == | == Syntax == | ||
− | (text[!<id>] <pos>; < | + | (text[!<id>] <pos>; <text>; <css>; <template>) |
E.g. | E.g. | ||
− | (text!mytext r1c1 | + | (text!mytext r1c1; text; color:blue) |
+ | |||
+ | == Template == | ||
+ | The template is HTML code that is applied to the text to display the final result. The text is split into parts using the pipe character. These parts are replaced inside the template's code to form the final source. | ||
+ | |||
+ | '''%<n>''' (with n starting from 1) is used to include each part of the text inside the HTML. To avoid the % symbol to be replaced, use '''&#37;''' instead. | ||
+ | |||
+ | E.g. If the template is: | ||
+ | <syntaxhighlight lang="html4strict"> | ||
+ | <table><tr><td>%1</td><td>%2</td></table> | ||
+ | </syntaxhighlight> | ||
+ | and the text is: | ||
+ | a|one,b | ||
+ | the resulting text will have the following html code: | ||
+ | <syntaxhighlight lang="html4strict"> | ||
+ | <table><tr><td>a</td><td>one</td></table> | ||
+ | </syntaxhighlight> | ||
== UI Attributes == | == UI Attributes == | ||
{{UI Object Attributes (Common)}} | {{UI Object Attributes (Common)}} | ||
− | === | + | === Text attributes === |
{| class="wikitable" | {| class="wikitable" | ||
!Name | !Name | ||
Line 22: | Line 38: | ||
!Description | !Description | ||
|- | |- | ||
− | | | + | |text or value |
− | | | + | |string |
− | | | + | |Set the text |
|- | |- | ||
− | | | + | |template |
− | | | + | |html code |
− | + | |Set the text's template | |
− | |||
− | |||
− | |||
− | |||
− | |Set the text | ||
|- | |- | ||
|} | |} |
Latest revision as of 15:01, 19 December 2019
Shows a generic text.
Parameters
- id: the object's ID, used by UISets. Required
- position: the object's position. Use the pixels or rows and columns coordinates format
- text: the text. Can contain HTML tags
- css: optional, and defines the CSS style
- template: optional, html template to be used for each item
Syntax
(text[!<id>] <pos>; <text>; <css>; <template>)
E.g.
(text!mytext r1c1; text; color:blue)
Template
The template is HTML code that is applied to the text to display the final result. The text is split into parts using the pipe character. These parts are replaced inside the template's code to form the final source.
%<n> (with n starting from 1) is used to include each part of the text inside the HTML. To avoid the % symbol to be replaced, use % instead.
E.g. If the template is:
<table><tr><td>%1</td><td>%2</td></table>
and the text is:
a|one,b
the resulting text will have the following html code:
<table><tr><td>a</td><td>one</td></table>
UI Attributes
Common attributes
Name | Value | Description |
---|---|---|
pos | x<x>y<y> | Position specified as x/y coordinates. E.g. x-5y10 |
visible | true | Default. Show the object |
false | Hide the object | |
blink | true | slow | Blink the object at a slow speed |
fast | Blink the object at a fast speed | |
false | Stop the blinking | |
opacity | 0.0 ... 1.0 | Object opacity from 0 (not visible) to 1 (fully visible) |
rotation | 0 ... 360 | Object rotation in degrees. Images are rotated around the center point, all other objects are rotated around the top left corner |
Text attributes
Name | Value | Description |
---|---|---|
text or value | string | Set the text |
template | html code | Set the text's template |