2017-11-07 21:21:58 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Executed every time an inventory display is opened.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Inventory display <DISPLAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [DISPLAY] call ACE_movement_fnc_inventoryDisplayLoad
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2017-12-16 03:50:17 +00:00
|
|
|
#include "script_component.hpp"
|
2016-02-21 20:24:39 +00:00
|
|
|
|
2017-12-16 03:50:17 +00:00
|
|
|
params ["_display"];
|
2016-02-21 20:24:39 +00:00
|
|
|
|
2017-12-16 03:50:17 +00:00
|
|
|
private _fnc_update = {
|
|
|
|
params ["_display"];
|
|
|
|
private _control = _display displayCtrl 111;
|
2016-02-21 20:24:39 +00:00
|
|
|
|
2017-12-16 03:50:17 +00:00
|
|
|
_control ctrlSetText format ["%1 - %2 %3 (%4)",
|
|
|
|
[ACE_player, false, true] call EFUNC(common,getName),
|
|
|
|
localize ELSTRING(common,Weight),
|
|
|
|
[ACE_player] call EFUNC(common,getWeight),
|
|
|
|
[ACE_player, true] call EFUNC(common,getWeight)
|
|
|
|
];
|
|
|
|
};
|
2016-02-21 20:24:39 +00:00
|
|
|
|
2017-12-16 03:50:17 +00:00
|
|
|
_display displayAddEventHandler ["MouseMoving", _fnc_update];
|
|
|
|
_display displayAddEventHandler ["MouseHolding", _fnc_update];
|
|
|
|
|
|
|
|
_display call _fnc_update;
|