2015-01-11 19:32:51 +00:00
|
|
|
/*
|
2015-05-09 02:47:15 +00:00
|
|
|
* Author: Garth de Wet (LH)
|
|
|
|
* Shows the interaction helper text with the mouse buttons at the bottom middle of the screen
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Left Click Text <STRING>
|
|
|
|
* 1: Right Click Text <STRING>
|
|
|
|
* 2: Scroll Text <STRING> (Optional)
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* ["Place Explosive", "Cancel"] call ace_interaction_fnc_showMouseHint
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-11 23:13:47 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-01-11 19:32:51 +00:00
|
|
|
#define GUI_GRID_W (0.025)
|
|
|
|
#define GUI_GRID_H (0.04)
|
2015-05-09 20:14:00 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
params ["_leftClick", "_rightClick", ["_scroll", ""]];
|
2015-05-09 20:14:00 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
(QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(InteractionHelper), "PLAIN", 0.5, false];
|
2015-01-11 19:32:51 +00:00
|
|
|
|
|
|
|
disableSerialization;
|
2015-09-26 01:16:55 +00:00
|
|
|
|
|
|
|
private "_display";
|
2015-01-12 04:20:02 +00:00
|
|
|
_display = uiNamespace getVariable ["ACE_Helper_Display", objNull];
|
2015-09-26 01:16:55 +00:00
|
|
|
|
|
|
|
if (isNull _display) exitWith {};
|
2015-01-11 19:32:51 +00:00
|
|
|
|
|
|
|
(_display displayCtrl 1000) ctrlSetText _leftClick;
|
|
|
|
(_display displayCtrl 1001) ctrlSetText _rightClick;
|
|
|
|
|
|
|
|
(_display displayCtrl 1000) ctrlShow (_leftClick != "");
|
|
|
|
(_display displayCtrl 1200) ctrlShow (_leftClick != "");
|
|
|
|
(_display displayCtrl 1001) ctrlShow (_rightClick != "");
|
|
|
|
(_display displayCtrl 1201) ctrlShow (_rightClick != "");
|
|
|
|
|
|
|
|
if (_scroll == "") exitWith {
|
2015-04-06 16:22:43 +00:00
|
|
|
(_display displayCtrl 1002) ctrlShow false;
|
|
|
|
(_display displayCtrl 1202) ctrlShow false;
|
2015-09-26 01:16:55 +00:00
|
|
|
(_display displayCtrl 1001) ctrlSetPosition [21 * GUI_GRID_W, 18 * GUI_GRID_H, 24 * GUI_GRID_W, 1.5 * GUI_GRID_H];
|
|
|
|
(_display displayCtrl 1201) ctrlSetPosition [20 * GUI_GRID_W, 18.5 * GUI_GRID_H, 1.5 * GUI_GRID_W, 1 * GUI_GRID_H];
|
2015-04-06 16:22:43 +00:00
|
|
|
(_display displayCtrl 1001) ctrlCommit 0;
|
|
|
|
(_display displayCtrl 1201) ctrlCommit 0;
|
2015-01-11 19:32:51 +00:00
|
|
|
};
|
2015-09-26 01:16:55 +00:00
|
|
|
|
2015-01-11 19:32:51 +00:00
|
|
|
(_display displayCtrl 1002) ctrlSetText _scroll;
|
2015-09-26 01:16:55 +00:00
|
|
|
|
2016-03-06 15:47:46 +00:00
|
|
|
// Enable action menu
|
|
|
|
inGameUISetEventHandler ["PrevAction", "true"];
|
|
|
|
inGameUISetEventHandler ["NextAction", "true"];
|
|
|
|
inGameUISetEventHandler ["Action", "true"];
|