2015-02-21 20:11:03 +00:00
|
|
|
/*
|
|
|
|
* Author: NouberNou
|
|
|
|
* Handle self action key down
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* true <BOOL>
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-02-18 21:58:06 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
if(!GVAR(keyDownSelfAction)) then {
|
2015-03-23 23:02:30 +00:00
|
|
|
closeDialog 0;
|
|
|
|
|
2015-02-19 13:49:36 +00:00
|
|
|
GVAR(keyDownSelfAction) = true;
|
|
|
|
GVAR(keyDown) = false;
|
|
|
|
GVAR(keyDownTime) = diag_tickTime;
|
2015-02-18 21:58:06 +00:00
|
|
|
|
2015-03-11 17:45:01 +00:00
|
|
|
["interactMenuOpened", [1]] call EFUNC(common,localEvent);
|
|
|
|
|
2015-02-28 21:56:57 +00:00
|
|
|
GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) || GVAR(AlwaysUseCursorSelfInteraction) || visibleMap;
|
2015-02-28 20:48:46 +00:00
|
|
|
|
|
|
|
if (GVAR(useCursorMenu)) then {
|
|
|
|
closeDialog 0;
|
|
|
|
createDialog QGVAR(cursorMenu);
|
|
|
|
// The dialog sets:
|
|
|
|
// uiNamespace getVariable QGVAR(dlgCursorMenu);
|
|
|
|
// uiNamespace getVariable QGVAR(cursorMenuOpened);
|
|
|
|
ctrlEnable [91921, true];
|
|
|
|
((finddisplay 91919) displayctrl 91921) ctrlAddEventHandler ["MouseMoving", {
|
|
|
|
GVAR(cursorPos) = [_this select 1, _this select 2, 0];
|
|
|
|
}];
|
|
|
|
setMousePosition [0.5, 0.5];
|
|
|
|
|
|
|
|
};
|
2015-03-03 04:37:17 +00:00
|
|
|
|
|
|
|
GVAR(selfMenuOffset) = ((positionCameraToWorld [0, 0, 2]) call EFUNC(common,positionToASL)) vectorDiff
|
|
|
|
((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL));
|
2015-02-18 21:58:06 +00:00
|
|
|
};
|
|
|
|
true
|