BIS fnc typeText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "BIS fnc " to "BIS_fnc_")
 
(35 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|eff= local


|1.00|= Game version
|gr1= GUI
____________________________________________________________________________________________


| <pre>/*
|descr= Types a structured text on the screen, letter by letter, cursor blinking.<br>
[[File:BIS_fnc_typeText.gif|left|400px]]


Description:
|s1= [stringLines, posX, posY, rootFormat] spawn [[BIS_fnc_typeText]]
Types a structured text on the screen, letter by letter, cursor blinking.


Parameter(s):
|p1= stringLines:
_this: array containing blocks of text with same structured text formatting
* [[Array]] of [[String]]s - array containing lines of text with same structured text formatting.
* [[Array]] of [[Array]]s format [text, format, blinkCount]:
** text: [[String]] - (Optional, default "")
** format: [[String]] - (Optional, default "<t align = 'center' shadow = '1' size = '0.7'>%1</t>&lt;br/&gt;")
** blinkCount: [[Number]] - (Optional, default 5) number of cursor blinks after text typing


Remarks:
|p2= posX: [[Number]] - (Optional, default 0)
* Every text block is an array of text and formatting tag.
* Blocks don't have to span over whole line.


Example:
|p3= posY: [[Number]] - (Optional, default 0)


[
|p4= rootFormat: [[String]] - (Optional, default "<t>%1</t>") the parent format
["CAMP ROGAIN,","<t align = 'center' shadow = '1' size = '0.7' font='PuristaBold'>%1</t>"],
["RESSUPLY POINT","<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>"],
["10 MINUTES LATER ...","<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"]


] spawn BIS_fnc_typeText;
|r1= [[Nothing]]
*/


#define DELAY_CHARACTER 0.06;
|x1= <sqf>
#define DELAY_CURSOR 0.04;
[
[
["CAMP ROGAIN,", "<t align = 'center' shadow = '1' size = '0.7' font='PuristaBold'>%1</t>"],
["RESUPPLY POINT", "<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>"],
["10 MINUTES LATER ...", "<t align = 'center' shadow = '1' size = '1.0'>%1</t>", 15]
]
] spawn BIS_fnc_typeText;
</sqf>


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|x2= <sqf>[
____________________________________________________________________________________________
[
 
["Hello there...", nil, 30]
| <!-- [] call [[BIS_fnc_typeText]]; --> |= Syntax
],
 
0, safeZoneY + safeZoneH / 2
|p1= |= Parameter 1
] spawn BIS_fnc_typeText;</sqf>
 
| |= Return value
____________________________________________________________________________________________


|x1= <code></code> |=
|exec= spawn
____________________________________________________________________________________________
 
| |= See also


|seealso= [[BIS_fnc_dynamicText]] [[BIS_fnc_infoText]] [[BIS_fnc_textTiles]] [[BIS_fnc_typeText2]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: GUI|{{uc:typeText}}]]
[[Category:Functions|{{uc:typeText}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:typeText}}]]

Latest revision as of 12:15, 27 July 2022

Hover & click on the images for description

Description

Description:
Types a structured text on the screen, letter by letter, cursor blinking.
BIS fnc typeText.gif
Execution:
spawn
Groups:
GUI

Syntax

Syntax:
[stringLines, posX, posY, rootFormat] spawn BIS_fnc_typeText
Parameters:
stringLines:
  • Array of Strings - array containing lines of text with same structured text formatting.
  • Array of Arrays format [text, format, blinkCount]:
    • text: String - (Optional, default "")
    • format: String - (Optional, default "<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>")
    • blinkCount: Number - (Optional, default 5) number of cursor blinks after text typing
posX: Number - (Optional, default 0)
posY: Number - (Optional, default 0)
rootFormat: String - (Optional, default "<t>%1</t>") the parent format
Return Value:
Nothing

Examples

Example 1:
[ [ ["CAMP ROGAIN,", "<t align = 'center' shadow = '1' size = '0.7' font='PuristaBold'>%1</t>"], ["RESUPPLY POINT", "<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>"], ["10 MINUTES LATER ...", "<t align = 'center' shadow = '1' size = '1.0'>%1</t>", 15] ] ] spawn BIS_fnc_typeText;
Example 2:
[ [ ["Hello there...", nil, 30] ], 0, safeZoneY + safeZoneH / 2 ] spawn BIS_fnc_typeText;

Additional Information

See also:
BIS_fnc_dynamicText BIS_fnc_infoText BIS_fnc_textTiles BIS_fnc_typeText2

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note