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
|
// map
|
||||||
class RscDisplayMainMap {
|
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););
|
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 Extended_PreInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
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
|
// handle preloaded missile
|
||||||
class Extended_InitPost_EventHandlers {
|
class Extended_InitPost_EventHandlers {
|
||||||
class CAManBase {
|
class CAManBase {
|
||||||
|
@ -3,10 +3,6 @@
|
|||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
["inventoryDisplayLoaded", {
|
|
||||||
[ACE_player, _this select 0] call FUNC(updateInventoryDisplay)
|
|
||||||
}] call EFUNC(common,addEventHandler);
|
|
||||||
|
|
||||||
["playerInventoryChanged", {
|
["playerInventoryChanged", {
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
[_unit] call FUNC(takeLoadedATWeapon);
|
[_unit] call FUNC(takeLoadedATWeapon);
|
||||||
|
@ -10,3 +10,9 @@ class Extended_PostInit_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
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(customFilters) = [];
|
||||||
GVAR(selectedFilterIndex) = -1;
|
GVAR(selectedFilterIndex) = -1;
|
||||||
|
|
||||||
["inventoryDisplayLoaded", {_this call FUNC(inventoryDisplayLoaded)}] call EFUNC(common,addEventHandler);
|
|
||||||
|
|
||||||
// add custom filters
|
// add custom filters
|
||||||
|
|
||||||
// generate list of grenades
|
// generate list of grenades
|
||||||
|
@ -5,7 +5,7 @@ ADDON = false;
|
|||||||
PREP(addCustomFilter);
|
PREP(addCustomFilter);
|
||||||
PREP(currentItemListBox);
|
PREP(currentItemListBox);
|
||||||
PREP(forceItemListUpdate);
|
PREP(forceItemListUpdate);
|
||||||
PREP(inventoryDisplayLoaded);
|
PREP(inventoryDisplayLoad);
|
||||||
PREP(onLBSelChanged);
|
PREP(onLBSelChanged);
|
||||||
|
|
||||||
// cache config
|
// cache config
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
class Extended_PreInit_EventHandlers {
|
class Extended_PreInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
@ -9,3 +10,9 @@ class Extended_PostInit_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
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 {};
|
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),
|
["ACE3 Movement", QGVAR(climb), localize LSTRING(Climb),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
|
Loading…
Reference in New Issue
Block a user