2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2016-02-21 19:26:30 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Initializes the modifier key handler.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public : No
|
|
|
|
*/
|
|
|
|
|
2016-03-02 22:14:23 +00:00
|
|
|
_this spawn {//
|
|
|
|
waitUntil {!isNull findDisplay 46};//
|
|
|
|
sleep 2;//
|
2016-02-21 19:26:30 +00:00
|
|
|
|
2016-03-02 22:14:23 +00:00
|
|
|
disableSerialization;
|
2016-02-21 19:26:30 +00:00
|
|
|
|
2016-03-02 22:14:23 +00:00
|
|
|
params ["_display"];
|
|
|
|
|
|
|
|
_display displayAddEventHandler ["KeyDown", {_this call FUNC(handleModifierKey)}];
|
|
|
|
_display displayAddEventHandler ["KeyUp", {_this call FUNC(handleModifierKeyUp)}];
|
|
|
|
};//
|
|
|
|
|
|
|
|
//@todo, remove all lines with comments after CBA update, events rewrite branch
|
|
|
|
// note 2, will break in save games after ~ 10 seconds thanks to CBA, fixed with above
|