BIS fnc displayColorSet: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " +" to " ")
m (Some wiki formatting)
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| TKOH
|game1= tkoh
|version1= 1.00


|1.00
|game2= arma3
|version2= 0.50


|gr1= GUI
|gr1= GUI


| Applies custom [[User Interface Colors|color settings]] to given [[Display]].
|descr= Applies custom [[User Interface Colors|color settings]] to given [[Display]].


Display must be already using color macros, function will just refresh the values according to current color settings.
Display must be already using color macros, function will just refresh the values according to current color settings.


| [displayClass,display,commitTime,code] call BIS_fnc_displayColorSet;
|s1= [displayClass, display, commitTime, code] call [[BIS_fnc_displayColorSet]]
 
|p1= displayClass: [[Config]] - display config class


|p1= displayClass: [[Config]] - Display classname
|p2= display: [[Display]]
|p2= display: [[Display]]


|p3= commitTime (Optional): [[Number]] - Commit time
|p3= commitTime: [[Number]] - (Optional, default 0) commit time
 
|p4= code: [[Code]] - (Optional, default <sqf inline>{}</sqf>) code executed for every control element (which is passed as _this)


|p4= code (Optional): [[Code]] - Code executed for every control element (which is passed as _this)
|r1= [[Boolean]]


|r1=[[Boolean]]
|x1= <sqf>[configFile >> (GUI_classes select _forEachIndex), _x] call BIS_fnc_displayColorSet;</sqf>


|x1= <code><nowiki>[</nowiki>[[configFile]] >> (GUI_classes [[select]] _foreachindex),_x] call bis_fnc_displayColorSet;</code>
|x2= <sqf>
|x2= <code>[
[
configfile >> _class,
configFile >> _class,
_display,
_display,
0,
0,
{
{
_this [[ctrlSetFade]] 0;
_this ctrlSetFade 0;
_this [[ctrlCommit]] 0.5;
_this ctrlCommit 0.5;
}
}
] call bis_fnc_displayColorSet;</code>
] call BIS_fnc_displayColorSet;
</sqf>
 
|seealso= [[BIS_fnc_displayColorGet]]
}}
}}
[[Category:{{Name|tkoh}}: Functions|{{uc:displayColorSet}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:displayColorSet}}]]

Latest revision as of 02:36, 1 August 2022

Hover & click on the images for description

Description

Description:
Applies custom color settings to given Display. Display must be already using color macros, function will just refresh the values according to current color settings.
Execution:
call
Groups:
GUI

Syntax

Syntax:
[displayClass, display, commitTime, code] call BIS_fnc_displayColorSet
Parameters:
displayClass: Config - display config class
display: Display
commitTime: Number - (Optional, default 0) commit time
code: Code - (Optional, default {}) code executed for every control element (which is passed as _this)
Return Value:
Boolean

Examples

Example 1:
[configFile >> (GUI_classes select _forEachIndex), _x] call BIS_fnc_displayColorSet;
Example 2:
[ configFile >> _class, _display, 0, { _this ctrlSetFade 0; _this ctrlCommit 0.5; } ] call BIS_fnc_displayColorSet;

Additional Information

See also:
BIS_fnc_displayColorGet

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