mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
won't work yet, pls no merge
This commit is contained in:
parent
20676a2f03
commit
f460d5aa23
@ -34,7 +34,7 @@ if (GVAR(pfID) >= 0) then {
|
|||||||
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
|
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
|
||||||
GVAR(pfID) = -1;
|
GVAR(pfID) = -1;
|
||||||
if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
|
if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
|
||||||
([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
QGVAR(modeDisplay) cutText ["", "PLAIN"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ if (shownArtilleryComputer && {GVAR(disableArtilleryComputer)}) then {
|
|||||||
// Restart display if null (not just at start, this will happen periodicly)
|
// Restart display if null (not just at start, this will happen periodicly)
|
||||||
if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
|
if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
|
||||||
TRACE_1("creating display",_this);
|
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;
|
private _ctrlGroup = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl 1000;
|
||||||
|
@ -63,7 +63,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
|||||||
};
|
};
|
||||||
//"\A3\Weapons_F\empty.p3d" is fine, but ctrlSetModel ""; - will crash game!
|
//"\A3\Weapons_F\empty.p3d" is fine, but ctrlSetModel ""; - will crash game!
|
||||||
if (_model == "") exitWith {ERROR("No Model");};
|
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;
|
((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, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
|
||||||
_unit removeAction _actionID;
|
_unit removeAction _actionID;
|
||||||
|
|
||||||
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
QGVAR(virtualAmmo) cutText ["", "PLAIN"];
|
||||||
|
|
||||||
if (GVAR(placeAction) == PLACE_APPROVE) then {
|
if (GVAR(placeAction) == PLACE_APPROVE) then {
|
||||||
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAttachText, _virtualPos] call FUNC(placeApprove);
|
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAttachText, _virtualPos] call FUNC(placeApprove);
|
||||||
|
@ -29,7 +29,7 @@ _id = _id + 1;
|
|||||||
|
|
||||||
if (_id == 0) then {
|
if (_id == 0) then {
|
||||||
uiNamespace setVariable ["ACE_EventHandler_MapMarker", count allMapMarkers];
|
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;
|
_actionIDs pushBack _id;
|
||||||
|
@ -70,9 +70,7 @@ if (!isServer) then {
|
|||||||
|
|
||||||
if (_mode < 2) then {
|
if (_mode < 2) then {
|
||||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||||
|
"ACE_RscErrorHint" cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
|
||||||
private _rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
|
|
||||||
_rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
|
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
private _ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
|
private _ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
|
||||||
|
@ -42,7 +42,7 @@ if (typeName _text != "TEXT") then {
|
|||||||
|
|
||||||
private _isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
|
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;
|
disableSerialization;
|
||||||
private _ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
|
private _ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
|
||||||
|
@ -23,9 +23,9 @@ params ["_dogtagData", ["_doubleTags", false, [false]]];
|
|||||||
if (!hasInterface || {_dogtagData isEqualTo []}) exitWith {};
|
if (!hasInterface || {_dogtagData isEqualTo []}) exitWith {};
|
||||||
|
|
||||||
if (_doubleTags) then {
|
if (_doubleTags) then {
|
||||||
(QGVAR(tag) call BIS_fnc_rscLayer) cutRsc [QGVAR(doubleTag), "PLAIN", 1, true];
|
QGVAR(tag) cutRsc [QGVAR(doubleTag), "PLAIN", 1, true];
|
||||||
} else {
|
} 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];
|
private _display = uiNamespace getvariable [QGVAR(tag), displayNull];
|
||||||
if(isNull _display) exitWith {};
|
if(isNull _display) exitWith {};
|
||||||
|
@ -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)];
|
_unit setVariable [QGVAR(cancelActionEH), [_unit, "zoomtemp", {true}, {GVAR(placeAction) = PLACE_CANCEL;}] call EFUNC(common,AddActionEventHandler)];
|
||||||
|
|
||||||
//Display to show virtual object:
|
//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;
|
((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)
|
//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, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
|
||||||
[_unit, "zoomtemp", (_unit getVariable [QGVAR(cancelActionEH), -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 {
|
if (GVAR(placeAction) == PLACE_APPROVE) then {
|
||||||
private _placeAngle = 0;
|
private _placeAngle = 0;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(QGVAR(RscMouseHint) call BIS_fnc_rscLayer) cutFadeOut 0.2;
|
QGVAR(RscMouseHint) cutFadeOut 0.2;
|
||||||
|
|
||||||
// Re-enable action menu
|
// Re-enable action menu
|
||||||
inGameUISetEventHandler ["PrevAction", "false"];
|
inGameUISetEventHandler ["PrevAction", "false"];
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
params ["_textLMB", "_textRMB", ["_textMMB", ""], ["_extraIconSets", []]];
|
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];
|
private _display = uiNamespace getVariable [QGVAR(mouseHint), displayNull];
|
||||||
|
|
||||||
// Set text for buttons, hide if empty string
|
// Set text for buttons, hide if empty string
|
||||||
|
@ -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));
|
TRACE_2("Cleaning up old pfeh and display",_enabled,GVAR(pfID));
|
||||||
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
|
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
|
||||||
if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
|
if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
|
||||||
([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
QGVAR(modeDisplay) cutText ["", "PLAIN"];
|
||||||
};
|
};
|
||||||
GVAR(pfID) = -1;
|
GVAR(pfID) = -1;
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ GVAR(pfID) = [{
|
|||||||
// Restart display if null (not just at start, this will happen periodicly)
|
// Restart display if null (not just at start, this will happen periodicly)
|
||||||
if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
|
if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
|
||||||
TRACE_1("creating display",_this);
|
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 {
|
if (_adjustDown) then {
|
||||||
private _ctrl = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_MODECONTROLGROUP;
|
private _ctrl = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_MODECONTROLGROUP;
|
||||||
private _pos = ctrlPosition _ctrl;
|
private _pos = ctrlPosition _ctrl;
|
||||||
|
@ -43,7 +43,7 @@ if (_newDisplayShowMode in [DISPLAY_MODE_CLOSED, DISPLAY_MODE_HIDDEN]) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Close the display:
|
//Close the display:
|
||||||
(QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
QGVAR(TheRscTitleDisplay) cutText ["", "PLAIN"];
|
||||||
} else {
|
} else {
|
||||||
if (_newDisplayShowMode == DISPLAY_MODE_DISPLAY) then {
|
if (_newDisplayShowMode == DISPLAY_MODE_DISPLAY) then {
|
||||||
//If Dialog is open, back it up before closing:
|
//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;
|
closeDialog 0;
|
||||||
};
|
};
|
||||||
//Open the display:
|
//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
|
} else { //DISPLAY_MODE_DIALOG
|
||||||
//Close the display:
|
//Close the display:
|
||||||
(QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
QGVAR(TheRscTitleDisplay) cutText ["", "PLAIN"];
|
||||||
//Open the dialog:
|
//Open the dialog:
|
||||||
createDialog QGVAR(TheDialog);
|
createDialog QGVAR(TheDialog);
|
||||||
};
|
};
|
||||||
|
@ -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) cutText ["", "PLAIN"]; // Cleanup Old Display
|
||||||
(QGVAR(display) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; // Cleanup Old Display
|
|
||||||
if (_activated) then { // Create New 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
|
// Cleanup Old PP Effects
|
||||||
|
@ -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"];
|
params ["_player", "_newCameraView"];
|
||||||
|
|
||||||
if (_newCameraView == "GUNNER") then {
|
if (_newCameraView == "GUNNER") then {
|
||||||
private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
|
QGVAR(Zeroing) cutText ["", "PLAIN", 0];
|
||||||
_layer cutText ["", "PLAIN", 0];
|
|
||||||
|
|
||||||
if (!isNil QGVAR(fadePFH)) then {
|
if (!isNil QGVAR(fadePFH)) then {
|
||||||
[GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler;
|
[GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler;
|
||||||
|
@ -23,8 +23,7 @@ if (_weaponIndex < 0) exitWith {};
|
|||||||
private _adjustment = ACE_player getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]];
|
private _adjustment = ACE_player getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]];
|
||||||
|
|
||||||
// Display the adjustment knobs
|
// Display the adjustment knobs
|
||||||
private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
|
QGVAR(Zeroing) cutRsc [QGVAR(Zeroing), "PLAIN", 0, false];
|
||||||
_layer cutRsc [QGVAR(Zeroing), "PLAIN", 0, false];
|
|
||||||
|
|
||||||
// Find the display
|
// Find the display
|
||||||
private _display = uiNamespace getVariable [QGVAR(ZeroingDisplay), displayNull];
|
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
|
// Launch a PFH to wait and fade out the knobs
|
||||||
GVAR(fadePFH) = [{
|
GVAR(fadePFH) = [{
|
||||||
if (diag_tickTime >= GVAR(timeToHide)) exitWith {
|
if (diag_tickTime >= GVAR(timeToHide)) exitWith {
|
||||||
private _pfhId = _this select 1;
|
|
||||||
private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
|
QGVAR(Zeroing) cutFadeOut 2;
|
||||||
_layer cutFadeOut 2;
|
|
||||||
|
|
||||||
GVAR(fadePFH) = nil;
|
GVAR(fadePFH) = nil;
|
||||||
[_pfhId] call CBA_fnc_removePerFrameHandler;
|
[_pfhId] call CBA_fnc_removePerFrameHandler;
|
||||||
|
Loading…
Reference in New Issue
Block a user