won't work yet, pls no merge

This commit is contained in:
LinkIsGrim 2023-11-03 09:56:07 -04:00
parent 20676a2f03
commit f460d5aa23
15 changed files with 24 additions and 30 deletions

View File

@ -34,7 +34,7 @@ if (GVAR(pfID) >= 0) then {
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
GVAR(pfID) = -1;
if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
QGVAR(modeDisplay) cutText ["", "PLAIN"];
};
};

View File

@ -26,7 +26,7 @@ if (shownArtilleryComputer && {GVAR(disableArtilleryComputer)}) then {
// Restart display if null (not just at start, this will happen periodicly)
if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
TRACE_1("creating display",_this);
([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false];
QGVAR(modeDisplay) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false];
};
private _ctrlGroup = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl 1000;

View File

@ -63,7 +63,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
};
//"\A3\Weapons_F\empty.p3d" is fine, but ctrlSetModel ""; - will crash game!
if (_model == "") exitWith {ERROR("No Model");};
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false];
QGVAR(virtualAmmo) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false];
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModel _model;
[{
@ -92,7 +92,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
_unit removeAction _actionID;
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
QGVAR(virtualAmmo) cutText ["", "PLAIN"];
if (GVAR(placeAction) == PLACE_APPROVE) then {
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAttachText, _virtualPos] call FUNC(placeApprove);

View File

@ -29,7 +29,7 @@ _id = _id + 1;
if (_id == 0) then {
uiNamespace setVariable ["ACE_EventHandler_MapMarker", count allMapMarkers];
("ACE_EventHandlerHelper2" call BIS_fnc_rscLayer) cutRsc ["ACE_EventHandlerHelper2", "PLAIN"];
"ACE_EventHandlerHelper2" cutRsc ["ACE_EventHandlerHelper2", "PLAIN"];
};
_actionIDs pushBack _id;

View File

@ -70,9 +70,7 @@ if (!isServer) then {
if (_mode < 2) then {
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
private _rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
_rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
"ACE_RscErrorHint" cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
disableSerialization;
private _ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";

View File

@ -42,7 +42,7 @@ if (typeName _text != "TEXT") then {
private _isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
("ACE_RscHint" call BIS_fnc_rscLayer) cutRsc ["ACE_RscHint", "PLAIN", 0, true];
"ACE_RscHint" cutRsc ["ACE_RscHint", "PLAIN", 0, true];
disableSerialization;
private _ctrlHint = uiNamespace getVariable "ACE_ctrlHint";

View File

@ -23,9 +23,9 @@ params ["_dogtagData", ["_doubleTags", false, [false]]];
if (!hasInterface || {_dogtagData isEqualTo []}) exitWith {};
if (_doubleTags) then {
(QGVAR(tag) call BIS_fnc_rscLayer) cutRsc [QGVAR(doubleTag), "PLAIN", 1, true];
QGVAR(tag) cutRsc [QGVAR(doubleTag), "PLAIN", 1, true];
} else {
(QGVAR(tag) call BIS_fnc_rscLayer) cutRsc [QGVAR(singleTag), "PLAIN", 1, true];
QGVAR(tag) cutRsc [QGVAR(singleTag), "PLAIN", 1, true];
};
private _display = uiNamespace getvariable [QGVAR(tag), displayNull];
if(isNull _display) exitWith {};

View File

@ -38,7 +38,7 @@ _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(
_unit setVariable [QGVAR(cancelActionEH), [_unit, "zoomtemp", {true}, {GVAR(placeAction) = PLACE_CANCEL;}] call EFUNC(common,AddActionEventHandler)];
//Display to show virtual object:
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false];
QGVAR(virtualAmmo) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false];
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModel _p3dModel;
//Make sure it has a trigger that works when attached (eg, no tripwires that only do pressurePlate)
@ -155,7 +155,7 @@ GVAR(TweakedAngle) = 0;
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
[_unit, "zoomtemp", (_unit getVariable [QGVAR(cancelActionEH), -1])] call EFUNC(common,removeActionEventHandler);
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
QGVAR(virtualAmmo) cutText ["", "PLAIN"];
if (GVAR(placeAction) == PLACE_APPROVE) then {
private _placeAngle = 0;

View File

@ -15,7 +15,7 @@
* Public: No
*/
(QGVAR(RscMouseHint) call BIS_fnc_rscLayer) cutFadeOut 0.2;
QGVAR(RscMouseHint) cutFadeOut 0.2;
// Re-enable action menu
inGameUISetEventHandler ["PrevAction", "false"];

View File

@ -21,7 +21,7 @@
params ["_textLMB", "_textRMB", ["_textMMB", ""], ["_extraIconSets", []]];
(QGVAR(RscMouseHint) call BIS_fnc_rscLayer) cutRsc [QGVAR(RscMouseHint), "PLAIN", -1, false];
QGVAR(RscMouseHint) cutRsc [QGVAR(RscMouseHint), "PLAIN", -1, false];
private _display = uiNamespace getVariable [QGVAR(mouseHint), displayNull];
// Set text for buttons, hide if empty string

View File

@ -40,7 +40,7 @@ if ((!_enabled) && (GVAR(pfID) < 0)) exitWith {TRACE_2("Disabled - No Change",_e
TRACE_2("Cleaning up old pfeh and display",_enabled,GVAR(pfID));
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
QGVAR(modeDisplay) cutText ["", "PLAIN"];
};
GVAR(pfID) = -1;
@ -64,7 +64,7 @@ GVAR(pfID) = [{
// Restart display if null (not just at start, this will happen periodicly)
if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
TRACE_1("creating display",_this);
([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false];
QGVAR(modeDisplay) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false];
if (_adjustDown) then {
private _ctrl = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_MODECONTROLGROUP;
private _pos = ctrlPosition _ctrl;

View File

@ -43,7 +43,7 @@ if (_newDisplayShowMode in [DISPLAY_MODE_CLOSED, DISPLAY_MODE_HIDDEN]) then {
};
//Close the display:
(QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
QGVAR(TheRscTitleDisplay) cutText ["", "PLAIN"];
} else {
if (_newDisplayShowMode == DISPLAY_MODE_DISPLAY) then {
//If Dialog is open, back it up before closing:
@ -52,10 +52,10 @@ if (_newDisplayShowMode in [DISPLAY_MODE_CLOSED, DISPLAY_MODE_HIDDEN]) then {
closeDialog 0;
};
//Open the display:
(QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutRsc [QGVAR(TheRscTitleDisplay), "PLAIN", 0, true];
QGVAR(TheRscTitleDisplay) cutRsc [QGVAR(TheRscTitleDisplay), "PLAIN", 0, true];
} else { //DISPLAY_MODE_DIALOG
//Close the display:
(QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
QGVAR(TheRscTitleDisplay) cutText ["", "PLAIN"];
//Open the dialog:
createDialog QGVAR(TheDialog);
};

View File

@ -48,10 +48,9 @@ if (GVAR(fogScaling) > 0) then {
};
};
// Note: Using BIS_fnc_rscLayer because of bug with string syntax - https://feedback.bistudio.com/T120768
(QGVAR(display) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; // Cleanup Old Display
QGVAR(display) cutText ["", "PLAIN"]; // Cleanup Old Display
if (_activated) then { // Create New Display
(QGVAR(display) call BIS_fnc_rscLayer) cutRsc [QGVAR(title), "PLAIN", 0, false];
QGVAR(display) cutRsc [QGVAR(title), "PLAIN", 0, false];
};
// Cleanup Old PP Effects

View File

@ -31,8 +31,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
params ["_player", "_newCameraView"];
if (_newCameraView == "GUNNER") then {
private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
_layer cutText ["", "PLAIN", 0];
QGVAR(Zeroing) cutText ["", "PLAIN", 0];
if (!isNil QGVAR(fadePFH)) then {
[GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler;

View File

@ -23,8 +23,7 @@ if (_weaponIndex < 0) exitWith {};
private _adjustment = ACE_player getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]];
// Display the adjustment knobs
private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
_layer cutRsc [QGVAR(Zeroing), "PLAIN", 0, false];
QGVAR(Zeroing) cutRsc [QGVAR(Zeroing), "PLAIN", 0, false];
// Find the display
private _display = uiNamespace getVariable [QGVAR(ZeroingDisplay), displayNull];
@ -72,9 +71,8 @@ if (!isNil QGVAR(fadePFH)) exitWith {};
// Launch a PFH to wait and fade out the knobs
GVAR(fadePFH) = [{
if (diag_tickTime >= GVAR(timeToHide)) exitWith {
private _pfhId = _this select 1;
private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
_layer cutFadeOut 2;
QGVAR(Zeroing) cutFadeOut 2;
GVAR(fadePFH) = nil;
[_pfhId] call CBA_fnc_removePerFrameHandler;