ctrlFade: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (changed the private variable name to something more obvious)
 
(One intermediate revision by the same user not shown)
Line 18: Line 18:
|gr1= GUI Control
|gr1= GUI Control


|descr= Returns the current fade factor of control.
|descr= Returns the current fade factor of control.<br>
{{ Feature | Informative | Despite having <syntaxhighlight lang="cpp" inline>fade = 1;</syntaxhighlight> inside a control's config, <sqf inline>ctrlFade</sqf> will '''still report a fade of 0'''.<br>
Only the value actually set by [[ctrlSetFade]] will be returned by [[ctrlFade]].}}


|s1= [[ctrlFade]] controlName
|s1= [[ctrlFade]] controlName
Line 26: Line 28:
|r1= [[Number]]
|r1= [[Number]]


|x1= <sqf>_scale = ctrlFade _control;</sqf>
|x1= <sqf>_fade = ctrlFade _control;</sqf>


|seealso= [[ctrlSetFade]]
|seealso= [[ctrlSetFade]]
}}
{{Note
|user= Nelis.75733126
|timestamp= 20240416192556
|text= If you use <syntaxhighlight lang="cpp" inline>fade = 1;</syntaxhighlight> on a control in your dialog definitions, is has zero effect on what <sqf inline>ctrlFade</sqf> returns.<br>
Meaning: <sqf inline>ctrlFade</sqf> will only return a value that has been set by [[ctrlSetFade]]
}}
}}

Latest revision as of 15:19, 21 April 2024

Hover & click on the images for description

Description

Description:
Returns the current fade factor of control.
Despite having fade = 1; inside a control's config, ctrlFade will still report a fade of 0.
Only the value actually set by ctrlSetFade will be returned by ctrlFade.
Groups:
GUI Control

Syntax

Syntax:
ctrlFade controlName
Parameters:
controlName: Control
Return Value:
Number

Examples

Example 1:
_fade = ctrlFade _control;

Additional Information

See also:
ctrlSetFade

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