ctrlSetTextColor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
m (Text replacement - "{{Feature|Informative|" to "{{Feature|informative|")
 
(55 intermediate revisions by 4 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


| Sets text color of given control. Color is in format [[Color]]. As of Arma 3 v1.40 this command could also be used to change fill colour or the [[DialogControls-ProgressBar]].|DESCRIPTION=
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| display '''ctrlSetTextColor''' color |SYNTAX=
|game4= tkoh
|version4= 1.00


|p1= display: [[Control]] |PARAMETER1=
|game5= arma3
|version5= 0.50


|p2= color: [[Array]] |PARAMETER2=
|gr1= GUI Control


| [[Nothing]] |RETURNVALUE=
|descr= Sets text color of given control. Color is in format [[Color|Color (RGBA)]]. As of Arma 3 v1.40 this command can also be used to change fill-color of a [[CT_PROGRESS]] control.
____________________________________________________________________________________________
 
|x1= <code>_control [[ctrlSetTextColor]] [1, 0, 0, 1]</code> |EXAMPLE1=
____________________________________________________________________________________________


|[[ctrlSetText]] |SEEALSO=
{{Feature|informative|Also try [[ctrlSetForegroundColor]], if this command doesn't have the desired effect.}}


}}
|s1= control [[ctrlSetTextColor]] color
 
|p1= control: [[Control]]
 
|p2= color: [[Array]]


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>_control ctrlSetTextColor [1, 0, 0, 1];</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[ctrlSetForegroundColor]] [[ctrlTextColor]] [[ctrlSetText]]
}}


[[Category:Scripting Commands|CTRLSETTEXTCOLOR]]
[[Category:Scripting Commands ArmA|CTRLSETTEXTCOLOR]]
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dd class="notedate">Posted on April 10, 2015 - 06:47 (UTC)</dd>
 
<dt></dt>
<dd class="notedate">Posted on 2015-04-10 - 06:47 (UTC)</dd>
<dt class="note">[[User:Fight9|Fight9]]</dt>
<dt class="note">[[User:Fight9|Fight9]]</dt>
<dd class="note">
<dd class="note">
When used on a [https://community.bistudio.com/wiki/DialogControls-ProgressBar RscProgress] control, remove the configured "texture" first. The two will affect each other. - Arma 3 v1.42
When used on a [[CT_PROGRESS]] control, remove the configured "texture" first. The two will affect each other. - Arma 3 v1.42
</dd>
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
<dt><dt>
<dl class="command_description">
<dd class="notedate">Posted on 2018-03-04 - 22:57 (UTC)</dd>
<dd class="notedate">Posted on March 4, 2018 - 22:57 (UTC)</dd>
<dt class="note">[[User:feint|feint]]</dt>
<dt class="note">[[User:feint|feint]]</dt>
<dd class="note">
<dd class="note">
This command can be used to change the color of the light that is illuminating a texture in a display.  By default, textures are lit with white light at 100% [1,1,1,1];
This command can be used to change the color of the light that is illuminating a texture in a display.  By default, textures are lit with white light at 100% [1,1,1,1];
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 00:26, 2 February 2024

Hover & click on the images for description

Description

Description:
Sets text color of given control. Color is in format Color (RGBA). As of Arma 3 v1.40 this command can also be used to change fill-color of a CT_PROGRESS control.
Also try ctrlSetForegroundColor, if this command doesn't have the desired effect.
Groups:
GUI Control

Syntax

Syntax:
control ctrlSetTextColor color
Parameters:
control: Control
color: Array
Return Value:
Nothing

Examples

Example 1:
_control ctrlSetTextColor [1, 0, 0, 1];

Additional Information

See also:
ctrlSetForegroundColor ctrlTextColor ctrlSetText

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 2015-04-10 - 06:47 (UTC)
Fight9
When used on a CT_PROGRESS control, remove the configured "texture" first. The two will affect each other. - Arma 3 v1.42
Posted on 2018-03-04 - 22:57 (UTC)
feint
This command can be used to change the color of the light that is illuminating a texture in a display. By default, textures are lit with white light at 100% [1,1,1,1];