BIS fnc highlightControl: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (fixed missing ; in example)
m (Text replacement - "\{\{ *cc*\| *([^}]+) *\}\}" to "// $1")
Line 17: Line 17:
|r1= [[Control]] - Returns the created highlight control.
|r1= [[Control]] - Returns the created highlight control.


|x1= <code><nowiki>[</nowiki>[[findDisplay]] 313 [[displayCtrl]] 1023] [[call]] [[BIS_fnc_highlightControl]]; {{cc|Will highlight the play button in [[Eden Editor]]}}
|x1= <code><nowiki>[</nowiki>[[findDisplay]] 313 [[displayCtrl]] 1023] [[call]] [[BIS_fnc_highlightControl]]; // Will highlight the play button in [[Eden Editor]]


<nowiki>[</nowiki>[[findDisplay]] 313] [[call]] [[BIS_fnc_highlightControl]]; {{cc|Will remove the previously created highlight effect}}</code>
<nowiki>[</nowiki>[[findDisplay]] 313] [[call]] [[BIS_fnc_highlightControl]]; // Will remove the previously created highlight effect</code>


|x2= <code>[] [[spawn]]
|x2= <code>[] [[spawn]]
Line 27: Line 27:
   [[sleep]] 2;
   [[sleep]] 2;
   [[ctrlDelete]] _ctrlHighlight;
   [[ctrlDelete]] _ctrlHighlight;
}; {{cc|Will highlight the play button in [[Eden Editor]] and removes the effect after two seconds}}</code>
}; // Will highlight the play button in [[Eden Editor]] and removes the effect after two seconds</code>


|seealso=
|seealso=
}}
}}

Revision as of 12:02, 13 July 2022

Hover & click on the images for description

Description

Description:
Highlights given control by drawing a border around it and letting it pulsate. The effect is visible until explicitly removed.
A3 BIS fnc highlightControl.jpg
Execution:
call
Groups:
GUI

Syntax

Syntax:
[displayOrControl, thickness] call BIS_fnc_highlightControl
Parameters:
displayOrControl: Control - Can be a Control or a Display. When a display is passed as parameter, the function will delete the previously created highlight control on that given display.
thickness: Number - (Optional, default 20) Thickness of the border
Return Value:
Control - Returns the created highlight control.

Examples

Example 1:
[findDisplay 313 displayCtrl 1023] call BIS_fnc_highlightControl; // Will highlight the play button in Eden Editor [findDisplay 313] call BIS_fnc_highlightControl; // Will remove the previously created highlight effect
Example 2:
[] spawn { disableSerialization; private _ctrlHighlight = [findDisplay 313 displayCtrl 1023),5] call BIS_fnc_highlightControl; sleep 2; ctrlDelete _ctrlHighlight; }; // Will highlight the play button in Eden Editor and removes the effect after two seconds

Additional Information

See also:
See also needed

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