-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
531 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
PREP(dlcOpen); | ||
PREP(dlcRequest); | ||
PREP(dlcRespond); | ||
PREP(dlcUpdate); | ||
PREP(fpsOpen); | ||
PREP(fpsRequest); | ||
PREP(fpsRespond); | ||
PREP(fpsUpdate); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/* | ||
armaforces_diagnostics_fnc_dlc_open | ||
File: fn_dlc_open.sqf | ||
Date: 2019-06-21 | ||
Last Update: 2019-07-29 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Handle DLC List display open. | ||
Parameter(s): | ||
_display - DLC List display [DISPLAY, defaults to displayNull] | ||
Returns: | ||
NOTHING | ||
*/ | ||
params [ | ||
["_display", displayNull, [displayNull]] | ||
]; | ||
|
||
if !([] call BIS_fnc_isDebugConsoleAllowed) exitWith { | ||
["No debug console access"] call CBA_fnc_notify; | ||
}; | ||
|
||
private _width = safezoneW * 0.75; | ||
|
||
// Confirm | ||
private _confirm = _display ctrlCreate ["RscButtonMenu", 10]; | ||
uiNamespace setVariable [QGVAR(dlcConfirm), _confirm]; | ||
|
||
private _confirmHeight = safezoneH / 23; | ||
private _confirmY = safezoneY + safezoneH/1.3 - 1.1 * _confirmHeight; | ||
|
||
_confirm ctrlSetPosition [ | ||
0.5 - _width/2 + _width*0.2, | ||
_confirmY, | ||
_width*0.8, _confirmHeight | ||
]; | ||
_confirm ctrlCommit 0; | ||
_confirm ctrlSetText toUpper "REFRESH"; | ||
|
||
_confirm ctrlAddEventHandler ["MouseButtonDown", { | ||
params ["_confirm", "_button"]; | ||
if (_button != 0) exitWith {}; | ||
_confirm ctrlEnable false; | ||
[{_this ctrlEnable true}, _confirm, 2] call CBA_fnc_waitAndExecute; | ||
|
||
[] call FUNC(dlcRequest); | ||
}]; | ||
|
||
private _close = _display ctrlCreate ["RscButtonMenu", 1]; | ||
_close ctrlSetPosition [ | ||
0.5 - _width/2, | ||
_confirmY, | ||
_width*0.2, _confirmHeight | ||
]; | ||
_close ctrlCommit 0; | ||
_close ctrlSetText "CLOSE"; | ||
|
||
// List | ||
private _listHeight = safezoneH/2; | ||
|
||
private _listBg = _display ctrlCreate ["RscText", 2]; // centered RscListNBox | ||
_listBg ctrlSetBackgroundColor [0,0,0,0.8]; | ||
|
||
private _list = _display ctrlCreate ["RscListNBox", 3]; // centered RscListNBox | ||
uiNamespace setVariable [QGVAR(dlcListDialog), _list]; | ||
|
||
_list lnbAddRow (["Player"] + (GVAR(dlcList) apply {""})); | ||
|
||
private _listColOffsets = []; | ||
{ | ||
_x params ["", "_name"]; | ||
|
||
_listColOffsets pushBack 0.12 + ((1 - 0.12) / count GVAR(dlcList)) * _forEachIndex; | ||
} forEach GVAR(dlcList); | ||
|
||
_list lnbSetColumnsPos ([0] + _listColOffsets); | ||
|
||
{ | ||
_x ctrlSetPosition [ | ||
0.5 - _width / 2, | ||
_confirmY - _listHeight - _confirmHeight/10 , | ||
_width, _listHeight | ||
]; | ||
_x ctrlCommit 0; | ||
} forEach [_listBg, _list]; | ||
|
||
[] call FUNC(dlcRequest); | ||
|
||
nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
armaforces_diagnostics_fnc_dlc_request | ||
File: fn_dlc_request.sqf | ||
Date: 2019-06-21 | ||
Last Update: 2019-07-29 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Request DLC ownership from clients. | ||
Parameter(s): | ||
NONE | ||
Returns: | ||
NOTHING | ||
*/ | ||
private _list = uiNamespace getVariable [QGVAR(dlcListDialog), controlNull]; | ||
|
||
lnbClear _list; | ||
_list lnbAddRow (["Player"] + (GVAR(dlcList) apply {"-"})); | ||
_list lnbSetCurSelRow 1; | ||
|
||
[{ | ||
[QGVAR(dlcRequest), player] call CBA_fnc_globalEvent; | ||
}] call CBA_fnc_execNextFrame; | ||
|
||
nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
armaforces_diagnostics_fnc_dlc_respond | ||
File: fn_dlc_respond.sqf | ||
Date: 2019-07-28 | ||
Last Update: 2019-07-29 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Respond to DLC ownership request. | ||
Parameter(s): | ||
_requester - Player that requested DLC list [OBJECT, defaults to objNull] | ||
Returns: | ||
NOTHING | ||
*/ | ||
params [ | ||
["_requester", objNull, [objNull]] | ||
]; | ||
|
||
private _ownedIds = getDLCs 1; | ||
|
||
private _DLCs = GVAR(dlcList); | ||
|
||
private _DLCsData = _DLCs apply { | ||
_x params ["_id", "_name"]; | ||
|
||
[_name, _id in _ownedIds]; | ||
}; | ||
|
||
[QGVAR(dlcResponse), | ||
[name player, _DLCsData], | ||
_requester | ||
] call CBA_fnc_targetEvent; | ||
|
||
nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
armaforces_diagnostics_fnc_dlc_update | ||
File: fn_dlc_update.sqf | ||
Date: 2019-06-21 | ||
Last Update: 2019-07-29 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Update DLC List display contents. | ||
Parameter(s): | ||
NONE | ||
Returns: | ||
NOTHING | ||
*/ | ||
params [ | ||
["_playerName", "", [""]], | ||
["_DLCsData", [], []] | ||
]; | ||
|
||
private _list = uiNamespace getVariable [QGVAR(dlcListDialog), controlNull]; | ||
|
||
private _lastRow = _list lnbAddRow ([_playerName] + (_DLCsData apply {_x select 0})); | ||
|
||
private ["_color"]; | ||
{ | ||
_color = [[1,0,0,1], [0,1,0,1]] select _x; | ||
_list lnbSetColor [[_lastRow, _forEachIndex+1], _color]; | ||
} forEach (_DLCsData apply {_x select 1}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
armaforces_diagnostics_fnc_fps_open | ||
File: fn_fps_open.sqf | ||
Date: 2019-06-21 | ||
Last Update: 2019-07-29 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Handle FPS List display open. | ||
Parameter(s): | ||
_display - FPS List display [DISPLAY, defaults to displayNull] | ||
Returns: | ||
NOTHING | ||
*/ | ||
params [ | ||
["_display", displayNull, [displayNull]] | ||
]; | ||
|
||
if !([] call BIS_fnc_isDebugConsoleAllowed) exitWith { | ||
["No debug console access"] call CBA_fnc_notify; | ||
}; | ||
|
||
private _width = safezoneW * 0.3; | ||
|
||
// Confirm | ||
private _confirm = _display ctrlCreate ["RscButtonMenu", 10]; | ||
uiNamespace setVariable [QGVAR(fpsConfirm), _confirm]; | ||
|
||
private _confirmHeight = safezoneH / 23; | ||
private _confirmY = safezoneY + safezoneH/1.3 - 1.1 * _confirmHeight; | ||
|
||
_confirm ctrlSetPosition [ | ||
0.5 - _width/2 + _width*0.2, | ||
_confirmY, | ||
_width*0.8, _confirmHeight | ||
]; | ||
_confirm ctrlCommit 0; | ||
_confirm ctrlSetText toUpper "REFRESH"; | ||
|
||
_confirm ctrlAddEventHandler ["MouseButtonDown", { | ||
params ["_confirm", "_button"]; | ||
if (_button != 0) exitWith {}; | ||
_confirm ctrlEnable false; | ||
[{_this ctrlEnable true}, _confirm, 2] call CBA_fnc_waitAndExecute; | ||
|
||
[] call FUNC(fpsRequest); | ||
}]; | ||
|
||
private _close = _display ctrlCreate ["RscButtonMenu", 1]; | ||
_close ctrlSetPosition [ | ||
0.5 - _width/2, | ||
_confirmY, | ||
_width*0.2, _confirmHeight | ||
]; | ||
_close ctrlCommit 0; | ||
_close ctrlSetText "CLOSE"; | ||
|
||
// List | ||
private _listHeight = safezoneH/2; | ||
|
||
private _listBg = _display ctrlCreate ["RscText", 11]; // centered RscListNBox | ||
_listBg ctrlSetBackgroundColor [0,0,0,0.8]; | ||
|
||
private _list = _display ctrlCreate ["RscListNBox", 12]; // centered RscListNBox | ||
uiNamespace setVariable [QGVAR(fpsListDialog), _list]; | ||
_list lnbSetColumnsPos [0.1,0.5,0.7]; | ||
_list lnbAddRow ["Player", "FPS Avg ", "FPS Min"]; | ||
_list lnbSetCurSelRow 1; | ||
|
||
{ | ||
_x ctrlSetPosition [ | ||
0.5 - _width / 2, | ||
_confirmY - _listHeight - _confirmHeight/10 , | ||
_width, _listHeight | ||
]; | ||
_x ctrlCommit 0; | ||
} forEach [_listBg, _list]; | ||
|
||
[] call FUNC(fpsRequest); | ||
|
||
nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
armaforces_diagnostics_fnc_fps_request | ||
File: fn_fps_request.sqf | ||
Date: 2019-06-21 | ||
Last Update: 2019-07-29 | ||
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | ||
Description: | ||
Request FPS values from clients. | ||
Parameter(s): | ||
NONE | ||
Returns: | ||
NOTHING | ||
*/ | ||
private _list = uiNamespace getVariable [QGVAR(fpsListDialog), controlNull]; | ||
|
||
lnbClear _list; | ||
_list lnbAddRow ["Player", "FPS Avg ", "FPS Min"]; | ||
|
||
[QGVAR(fpsRequest), player] call CBA_fnc_globalEvent; | ||
|
||
nil |
Oops, something went wrong.