2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
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
|
|
|
|
*/
|
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
|
|
|
|
2019-08-14 08:47:24 +00:00
|
|
|
// forces player name control to display irrespective of isStreamFriendlyUIEnabled
|
|
|
|
(_display displayCtrl 111) ctrlShow true;
|
|
|
|
|
2017-12-16 03:50:17 +00:00
|
|
|
private _fnc_update = {
|
|
|
|
params ["_display"];
|
|
|
|
private _control = _display displayCtrl 111;
|
2019-08-14 08:47:24 +00:00
|
|
|
private _format = ["%1 - %2 %3 (%4)", "%2 %3 (%4)"] select isStreamFriendlyUIEnabled;
|
2016-02-21 20:24:39 +00:00
|
|
|
|
2019-08-14 08:47:24 +00:00
|
|
|
_control ctrlSetText format [_format,
|
2017-12-16 03:50:17 +00:00
|
|
|
[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;
|