2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-02-22 03:19:54 +00:00
|
|
|
* Author: Pabst Mirror, commy2
|
|
|
|
* When the RscDisplayChannel is loaded, this will constantly uiNamespace variable ace_common_currentChannel
|
|
|
|
* with the raw localized text of CA_Channel (IDC=101). Only runs while the display is open.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The RscDisplayChannel Display <DISPLAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Nothing
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* onLoad = QUOTE(_this call FUNC(onLoadRscDisplayChannel));
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-02-22 03:19:54 +00:00
|
|
|
uiNamespace setVariable [QGVAR(currentChannelControl), ((_this select 0) displayCtrl 101)];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
["ACE_currentChannel", "onEachFrame", {
|
2015-02-22 03:19:54 +00:00
|
|
|
if (isNull (uiNamespace getVariable [QGVAR(currentChannelControl), controlNull])) then {
|
|
|
|
["ACE_currentChannel", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
|
|
|
} else {
|
|
|
|
private "_localizedChannelText";
|
|
|
|
_localizedChannelText = ctrlText (uiNamespace getVariable [QGVAR(currentChannelControl), controlNull]);
|
|
|
|
uiNamespace setVariable [QGVAR(currentChannel), _localizedChannelText];
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
}] call BIS_fnc_addStackedEventhandler;
|