ACE3/addons/ui/functions/fnc_findSetElement.sqf
jonpas ed15d99915 Fix basic UI being overwritten on RscDiary unload (#3920)
* Display disabled message when basic config set by mission showHud

* Set showHud on RscDiary unload - fix #3907, Remove redundant force parameter from basic setElements

* Log forced source to RPT

* Add source to scripted element setter
2016-06-18 11:32:56 +02:00

26 lines
476 B
Plaintext

/*
* Author: Jonpas
* Finds set element by element name and returns index, source of the set element and state.
*
* Arguments:
* 0: Element Name <STRING>
*
* Return Value:
* None
*
* Example:
* ["ace_ui_ammoCount"] call ace_ui_fnc_findSetElement
*
* Public: No
*/
#include "script_component.hpp"
params ["_element"];
{
if (_element in _x) exitWith {
[_forEachIndex, _x select 0, _x select 2]
};
[-1, "", false]
} forEach GVAR(elementsSet);