Difference between revisions of "VN fnc whitelisted arsenal override"
Jump to navigation
Jump to search
vn>Unknown user m (Generated by LM_exportFunctionsToWiki.sqf) |
Lou Montana (talk | contribs) m (1 revision imported) |
(No difference)
|
Revision as of 18:23, 5 January 2021
← back to Functions | Introduced in S.O.G. Prairie Fire v1.00 |
|
Description
/* FILE: fn_whitelisted_arsenal_override.sqf DATE: 10-06-2019 AUTHOR: Ethan Johnson DESCRIPTION: Master file that contains all the gui overrides for the arsenal when whitelisted arsenal is enabled. PARAMETERS: (0): DISPLAY - Arsenal display for the override to run on. RETURNS: NONE */ params ["_display"]; //= Random button removal (_display displayCtrl IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONRANDOM) ctrlSetText ""; (_display displayCtrl IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONRANDOM) ctrlSetTooltip ""; (_display displayCtrl IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONRANDOM) ctrlEnable false; (_display displayCtrl IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONRANDOM) ctrlRemoveAllEventHandlers "buttonclick"; _display displayAddEventHandler ["KeyDown", { params ["_displayorcontrol", "_key", "_shift", "_ctrl", "_alt"]; if (_key isEqualTo DIK_R && _ctrl) then {true} else {false}; }]; private _loadbutton = _display displayCtrl IDC_RSCDISPLAYARSENAL_TEMPLATE_BUTTONOK; _loadbutton ctrlRemoveAllEventHandlers "buttonclick"; _loadbutton ctrlAddEventHandler ["buttonclick", { with uinamespace do { [ctrlparent (_this select 0)] call vn_fnc_whitelisted_arsenal_templateokbutton; }; }]; _deletebutton = _display displayctrl IDC_RSCDISPLAYARSENAL_TEMPLATE_BUTTONDELETE; _deletebutton ctrlRemoveAllEventHandlers "buttonclick"; _deletebutton ctrladdeventhandler ["buttonclick", { with uinamespace do { ['buttonTemplateDelete',[ctrlparent (_this select 0)]] call bis_fnc_arsenal; [ctrlparent (_this select 0)] call vn_fnc_whitelisted_arsenal_lbcolor; }; }]; private _lblist = _display displayCtrl IDC_RSCDISPLAYARSENAL_TEMPLATE_VALUENAME; _lblist ctrlRemoveAllEventHandlers "lbdblclick"; _lblist ctrlAddEventHandler ["lbdblclick", { with uinamespace do { [ctrlparent (_this select 0)] call vn_fnc_whitelisted_arsenal_templateokbutton; }; }]; //VA button down, needed to override ENTER on template listbox _display displayRemoveAllEventHandlers "keyDown"; _display displayAddEventHandler ["keyDown", { params ["_display","_key","_shift","_ctrl","_alt"]; private _return = false; if (_ctrl && {_key in [DIK_RETURN,DIK_NUMPADENTER]}) then { _ctrlTemplate = _display displayCtrl IDC_RSCDISPLAYARSENAL_TEMPLATE_TEMPLATE; if (ctrlFade _ctrlTemplate isEqualTo 0) then { if (BIS_fnc_arsenal_type isEqualTo 0) then { [_display] call vn_fnc_whitelisted_arsenal_templateokbutton; _return = true; }; }; }; _return }]; _bottomloadbutton = _display displayctrl IDC_RSCDISPLAYARSENAL_CONTROLSBAR_BUTTONLOAD; _bottomloadbutton ctrlRemoveAllEventHandlers "buttonclick"; _bottomloadbutton ctrlAddEventHandler ["buttonclick", { with uinamespace do { ['buttonLoad',[ctrlparent (_this select 0)]] call bis_fnc_arsenal; [ctrlparent (_this select 0)] call vn_fnc_whitelisted_arsenal_lbcolor; }; }];(Placeholder description extracted from the function header by LM_exportFunctionsToWiki.sqf)
Syntax
- Syntax
- [] call VN_fnc_whitelisted_arsenal_override;
- Return value
- Nothing
Examples
- Example 1
-