mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
scripts for vector illum, renaming some files
This commit is contained in:
parent
83e634be8a
commit
56de4f05f3
@ -1,4 +1,14 @@
|
|||||||
// by commy2
|
// by commy2
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(holdKeyHandler) = -1;
|
||||||
|
GVAR(isKeyDownAzimuth) = false;
|
||||||
|
GVAR(isKeyDownDistance) = false;
|
||||||
|
GVAR(keyDownTimeAzimuth) = -1;
|
||||||
|
GVAR(keyDownTimeDistance) = -1;
|
||||||
|
GVAR(useMil) = false;
|
||||||
|
GVAR(useFeet) = false;
|
||||||
|
GVAR(modeReticle) = 0;
|
||||||
|
GVAR(illuminate) = false;
|
||||||
|
|
||||||
#include "initKeybinds.sqf"
|
#include "initKeybinds.sqf"
|
||||||
|
@ -31,14 +31,6 @@ PREP(showText);
|
|||||||
PREP(nextMode);
|
PREP(nextMode);
|
||||||
PREP(adjustBrightness);
|
PREP(adjustBrightness);
|
||||||
PREP(showReticle);
|
PREP(showReticle);
|
||||||
|
PREP(illuminate);
|
||||||
GVAR(holdKeyHandler) = -1;
|
|
||||||
GVAR(isKeyDownAzimuth) = false;
|
|
||||||
GVAR(isKeyDownDistance) = false;
|
|
||||||
GVAR(keyDownTimeAzimuth) = -1;
|
|
||||||
GVAR(keyDownTimeDistance) = -1;
|
|
||||||
GVAR(useMil) = false;
|
|
||||||
GVAR(useFeet) = false;
|
|
||||||
GVAR(modeReticle) = 0;
|
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -26,3 +26,7 @@ _color = [[1,0,0,0.5], [1,0,0,1]] select (_this select 0);
|
|||||||
(_dlgVector displayCtrl 1322) ctrlSetTextColor _color;
|
(_dlgVector displayCtrl 1322) ctrlSetTextColor _color;
|
||||||
(_dlgVector displayCtrl 1323) ctrlSetTextColor _color;
|
(_dlgVector displayCtrl 1323) ctrlSetTextColor _color;
|
||||||
(_dlgVector displayCtrl 1324) ctrlSetTextColor _color;
|
(_dlgVector displayCtrl 1324) ctrlSetTextColor _color;
|
||||||
|
|
||||||
|
GVAR(illuminate) = _this select 0;
|
||||||
|
|
||||||
|
_this call FUNC(illuminate);
|
||||||
|
41
addons/vector/functions/fnc_illuminate.sqf
Normal file
41
addons/vector/functions/fnc_illuminate.sqf
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
// by commy2
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private "_dlgVector";
|
||||||
|
|
||||||
|
disableSerialization;
|
||||||
|
_dlgVector = GETUVAR(ACE_dlgVector,displayNull);
|
||||||
|
|
||||||
|
if (_this select 0) then {
|
||||||
|
|
||||||
|
{
|
||||||
|
private ["_string", "_index"];
|
||||||
|
|
||||||
|
_string = ctrlText _x;
|
||||||
|
_index = _string find ".paa";
|
||||||
|
|
||||||
|
if (_index != -1 && {_string find "_illum.paa" == -1}) then {
|
||||||
|
_string = toArray _string;
|
||||||
|
_string resize _index;
|
||||||
|
|
||||||
|
_x ctrlSetText format ["%1_illum.paa", toString _string];
|
||||||
|
};
|
||||||
|
} forEach allControls _dlgVector;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
{
|
||||||
|
private ["_string", "_index"];
|
||||||
|
|
||||||
|
_string = ctrlText _x;
|
||||||
|
_index = _string find "_illum.paa";
|
||||||
|
|
||||||
|
if (_index != -1) then {
|
||||||
|
_string = toArray _string;
|
||||||
|
_string resize _index;
|
||||||
|
|
||||||
|
_x ctrlSetText format ["%1.paa", toString _string];
|
||||||
|
};
|
||||||
|
} forEach allControls _dlgVector;
|
||||||
|
|
||||||
|
};
|
@ -16,3 +16,5 @@ _digits = _direction call FUNC(convertToTexturesDegree);
|
|||||||
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);
|
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);
|
||||||
(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2);
|
(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2);
|
||||||
(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3);
|
(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3);
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -25,3 +25,5 @@ _digits = [_direction select 1] call FUNC(convertToTexturesDegree);
|
|||||||
(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1);
|
(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1);
|
||||||
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2);
|
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2);
|
||||||
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3);
|
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3);
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -8,3 +8,5 @@ Shows or hides the vectors center square thingy.
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1301) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_center.paa))] select (_this select 0));
|
((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1301) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_center.paa))] select (_this select 0));
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -16,3 +16,5 @@ _digits = [_distance] call FUNC(convertToTexturesDistance);
|
|||||||
(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1);
|
(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1);
|
||||||
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2);
|
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2);
|
||||||
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3);
|
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3);
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -53,3 +53,5 @@ if !(_this select 0) then {
|
|||||||
(_dlgVector displayCtrl 1319) ctrlSetText "";
|
(_dlgVector displayCtrl 1319) ctrlSetText "";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -25,3 +25,5 @@ _digits = [_heightDistance select 1] call FUNC(convertToTexturesDistance);
|
|||||||
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);
|
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);
|
||||||
(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2);
|
(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2);
|
||||||
(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3);
|
(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3);
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -23,3 +23,5 @@ if (_this select 0) then {
|
|||||||
(_dlgVector displayCtrl 1323) ctrlSetText "";
|
(_dlgVector displayCtrl 1323) ctrlSetText "";
|
||||||
(_dlgVector displayCtrl 1324) ctrlSetText "";
|
(_dlgVector displayCtrl 1324) ctrlSetText "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -25,3 +25,5 @@ _digits = [_azimuthDistance select 1] call FUNC(convertToTexturesDistance);
|
|||||||
(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1);
|
(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1);
|
||||||
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2);
|
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2);
|
||||||
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3);
|
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3);
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -25,3 +25,5 @@ _digits = [_heightLength select 1] call FUNC(convertToTexturesDistance);
|
|||||||
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);
|
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);
|
||||||
(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2);
|
(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2);
|
||||||
(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3);
|
(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3);
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -8,3 +8,5 @@ Shows or hides the electronic reticle.
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1302) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_crosshair.paa))] select (_this select 0));
|
((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1302) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_crosshair.paa))] select (_this select 0));
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
@ -153,3 +153,5 @@ switch (_this select 0) do {
|
|||||||
(_dlgVector displayCtrl 1324) ctrlSetText "";
|
(_dlgVector displayCtrl 1324) ctrlSetText "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[GVAR(illuminate)] call FUNC(illuminate);
|
||||||
|
Loading…
Reference in New Issue
Block a user