image: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - ">Posted on March ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-03-$1")
 
(6 intermediate revisions by the same user not shown)
Line 30: Line 30:
|r1= [[Structured Text]]
|r1= [[Structured Text]]


|x1= <code>hint [[composeText]] ["Image: ", [[image]] "\a3\Data_f\Flags\flag_Altis_co.paa"];</code>
|x1= <sqf>hint composeText ["Image: ", image "\a3\Data_f\Flags\flag_Altis_co.paa"];</sqf>
   
   
|x2= <code>hint [[str]] ([[composeText]] ["Image: ", [[image]] "\a3\Data_f\Flags\flag_Altis_co.paa"] == [[parseText]] "Image: <img image='\a3\Data_f\Flags\flag_Altis_co.paa'/>"); // true</code>
|x2= <sqf>hint str (composeText ["Image: ", image "\a3\Data_f\Flags\flag_Altis_co.paa"] == parseText "Image: <img image='\a3\Data_f\Flags\flag_Altis_co.paa'/>"); // true</sqf>


|seealso= [[setAttributes]] [[parseText]] [[text]] [[composeText]] [[lineBreak]]
|seealso= [[setAttributes]] [[parseText]] [[text]] [[composeText]] [[lineBreak]]
Line 40: Line 40:


<dt><dt>
<dt><dt>
<dd class="notedate">Posted on March 21, 2009</dd>
<dd class="notedate">Posted on 2009-03-21</dd>
<dt class="note">[[User:Spooner|Spooner]]</dt>
<dt class="note">[[User:Spooner|Spooner]]</dt>
<dd class="note">Although there is a dedicated [[image]] command, [[parseText]] gives more options:
<dd class="note">Although there is a dedicated [[image]] command, [[parseText]] gives more options:
<code>_imageText = parseText "<img size='5' color='#ff0000' image='fish.paa'/>"</code>
<sqf>_imageText = parseText "<img size='5' color='#ff0000' image='fish.paa'/>"</sqf>


</dl>
</dl>

Latest revision as of 00:06, 14 May 2023

Hover & click on the images for description

Description

Description:
Creates a structured text containing the given image. Use setAttributes to set additional attributes on the image.
Groups:
StringsGUI ControlStructured Text

Syntax

Syntax:
image filename
Parameters:
filename: String
Return Value:
Structured Text

Examples

Example 1:
hint composeText ["Image: ", image "\a3\Data_f\Flags\flag_Altis_co.paa"];
Example 2:
hint str (composeText ["Image: ", image "\a3\Data_f\Flags\flag_Altis_co.paa"] == parseText "Image: <img image='\a3\Data_f\Flags\flag_Altis_co.paa'/>"); // true

Additional Information

See also:
setAttributes parseText text composeText lineBreak

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
Posted on 2009-03-21
Spooner
Although there is a dedicated image command, parseText gives more options:
_imageText = parseText "<img size='5' color='#ff0000' image='fish.paa'/>"