image: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - ">Posted on March ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-03-$1")
 
(42 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma |Game name=
|game1= arma1
|version1= 1.00


|1.00|Game version=
|game2= arma2
|version2= 1.00


|gr1= Strings |GROUP1=
|game3= arma2oa
|version3= 1.50


|gr2= GUI Control |GROUP2=
|game4= tkoh
____________________________________________________________________________________________
|version4= 1.00


| Creates a structured text containing the given image. Use [[setAttributes]] to set additional [[Structured_Text#Attributes | attributes]] on the image. |DESCRIPTION=
|game5= arma3
____________________________________________________________________________________________
|version5= 0.50


| '''image''' filename |SYNTAX=
|gr1= Strings


|p1= filename: [[String]] |PARAMETER1=
|gr2= GUI Control


| [[Structured Text]] |RETURNVALUE=
|gr3= Structured Text
____________________________________________________________________________________________


|x1 = <code>[[hint]] [[composeText]] ["Image: ", [[image]] "\a3\Data_f\Flags\flag_Altis_co.paa"];</code> |EXAMPLE1=
|descr= Creates a structured text containing the given image. Use [[setAttributes]] to set additional [[Structured_Text#Attributes | attributes]] on the image.
 
|s1= [[image]] filename
 
|p1= filename: [[String]]
 
|r1= [[Structured Text]]
 
|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> |EXAMPLE2=
|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>
____________________________________________________________________________________________
 
| [[setAttributes]], [[parseText]], [[text]], [[composeText]], [[lineBreak]] |SEEALSO=


|seealso= [[setAttributes]] [[parseText]] [[text]] [[composeText]] [[lineBreak]]
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on March 21, 2009
<dt><dt>
<dt class="note">[[User:Spooner|Spooner]]
<dd class="notedate">Posted on 2009-03-21</dd>
<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>


<!-- Note Section END -->
</dl>
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|IMAGE]]
[[Category:Scripting Commands Armed Assault|IMAGE]]
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 23:06, 13 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'/>"