mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
replace inventoryDisplayLoaded with DisplayLoad event
This commit is contained in:
parent
e9808bf20b
commit
4335bfbfcf
@ -113,10 +113,6 @@ class RscInGameUI {
|
||||
};
|
||||
};
|
||||
|
||||
class RscDisplayInventory {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayInventory"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; [ARR_2('inventoryDisplayLoaded', _this)] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
// map
|
||||
class RscDisplayMainMap {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent););
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
@ -10,6 +11,12 @@ class Extended_PostInit_EventHandlers {
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_DisplayLoad_EventHandlers {
|
||||
class RscDisplayInventory {
|
||||
ADDON = QUOTE([ARR_2(ACE_player, _this select 0)] call FUNC(updateInventoryDisplay));
|
||||
};
|
||||
};
|
||||
|
||||
// handle preloaded missile
|
||||
class Extended_InitPost_EventHandlers {
|
||||
class CAManBase {
|
||||
|
@ -3,10 +3,6 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["inventoryDisplayLoaded", {
|
||||
[ACE_player, _this select 0] call FUNC(updateInventoryDisplay)
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
["playerInventoryChanged", {
|
||||
params ["_unit"];
|
||||
[_unit] call FUNC(takeLoadedATWeapon);
|
||||
|
@ -10,3 +10,9 @@ class Extended_PostInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_DisplayLoad_EventHandlers {
|
||||
class RscDisplayInventory {
|
||||
ADDON = QUOTE(_this call FUNC(inventoryDisplayLoad));
|
||||
};
|
||||
};
|
||||
|
@ -5,8 +5,6 @@ if (!hasInterface) exitWith {};
|
||||
GVAR(customFilters) = [];
|
||||
GVAR(selectedFilterIndex) = -1;
|
||||
|
||||
["inventoryDisplayLoaded", {_this call FUNC(inventoryDisplayLoaded)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// add custom filters
|
||||
|
||||
// generate list of grenades
|
||||
|
@ -5,7 +5,7 @@ ADDON = false;
|
||||
PREP(addCustomFilter);
|
||||
PREP(currentItemListBox);
|
||||
PREP(forceItemListUpdate);
|
||||
PREP(inventoryDisplayLoaded);
|
||||
PREP(inventoryDisplayLoad);
|
||||
PREP(onLBSelChanged);
|
||||
|
||||
// cache config
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
@ -9,3 +10,9 @@ class Extended_PostInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_DisplayLoad_EventHandlers {
|
||||
class RscDisplayInventory {
|
||||
ADDON = QUOTE(_this call COMPILE_FILE(XEH_inventoryDisplayLoad));
|
||||
};
|
||||
};
|
||||
|
14
addons/movement/XEH_inventoryDisplayLoad.sqf
Normal file
14
addons/movement/XEH_inventoryDisplayLoad.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
disableSerialization;
|
||||
|
||||
[{
|
||||
disableSerialization;
|
||||
params ["_dialog"];
|
||||
|
||||
if (isNull _dialog) exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
(_dialog displayCtrl 111) ctrlSetText format ["%1 - %2 %3", [ACE_player, false, true] call EFUNC(common,getName), localize LSTRING(Weight), [ACE_player] call FUNC(getWeight)];
|
||||
}, 0, _this select 0] call CBA_fnc_addPerFrameHandler;
|
@ -3,22 +3,6 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["inventoryDisplayLoaded", {
|
||||
|
||||
[{
|
||||
disableSerialization;
|
||||
params ["_dialog"];
|
||||
|
||||
if (isNull _dialog) exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
_dialog displayCtrl 111 ctrlSetText format ["%1 - %2 %3", [ACE_player, false, true] call EFUNC(common,getName), localize LSTRING(Weight), [ACE_player] call FUNC(getWeight)];
|
||||
|
||||
}, 0, _this select 0] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
["ACE3 Movement", QGVAR(climb), localize LSTRING(Climb),
|
||||
{
|
||||
// Conditions: canInteract
|
||||
|
Loading…
Reference in New Issue
Block a user