scripts for vector illum, renaming some files

This commit is contained in:
commy2 2015-04-12 13:56:01 +02:00
parent 83e634be8a
commit 56de4f05f3
40 changed files with 78 additions and 9 deletions

View File

@ -1,4 +1,14 @@
// by commy2
#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"

View File

@ -31,14 +31,6 @@ PREP(showText);
PREP(nextMode);
PREP(adjustBrightness);
PREP(showReticle);
GVAR(holdKeyHandler) = -1;
GVAR(isKeyDownAzimuth) = false;
GVAR(isKeyDownDistance) = false;
GVAR(keyDownTimeAzimuth) = -1;
GVAR(keyDownTimeDistance) = -1;
GVAR(useMil) = false;
GVAR(useFeet) = false;
GVAR(modeReticle) = 0;
PREP(illuminate);
ADDON = true;

View File

@ -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 1323) ctrlSetTextColor _color;
(_dlgVector displayCtrl 1324) ctrlSetTextColor _color;
GVAR(illuminate) = _this select 0;
_this call FUNC(illuminate);

View 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;
};

View File

@ -16,3 +16,5 @@ _digits = _direction call FUNC(convertToTexturesDegree);
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);
(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2);
(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3);
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -25,3 +25,5 @@ _digits = [_direction select 1] call FUNC(convertToTexturesDegree);
(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1);
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2);
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3);
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -8,3 +8,5 @@ Shows or hides the vectors center square thingy.
#include "script_component.hpp"
((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1301) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_center.paa))] select (_this select 0));
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -16,3 +16,5 @@ _digits = [_distance] call FUNC(convertToTexturesDistance);
(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1);
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2);
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3);
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -53,3 +53,5 @@ if !(_this select 0) then {
(_dlgVector displayCtrl 1319) ctrlSetText "";
};
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -25,3 +25,5 @@ _digits = [_heightDistance select 1] call FUNC(convertToTexturesDistance);
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);
(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2);
(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3);
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -23,3 +23,5 @@ if (_this select 0) then {
(_dlgVector displayCtrl 1323) ctrlSetText "";
(_dlgVector displayCtrl 1324) ctrlSetText "";
};
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -25,3 +25,5 @@ _digits = [_azimuthDistance select 1] call FUNC(convertToTexturesDistance);
(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1);
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2);
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3);
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -25,3 +25,5 @@ _digits = [_heightLength select 1] call FUNC(convertToTexturesDistance);
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);
(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2);
(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3);
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -8,3 +8,5 @@ Shows or hides the electronic reticle.
#include "script_component.hpp"
((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1302) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_crosshair.paa))] select (_this select 0));
[GVAR(illuminate)] call FUNC(illuminate);

View File

@ -153,3 +153,5 @@ switch (_this select 0) do {
(_dlgVector displayCtrl 1324) ctrlSetText "";
};
};
[GVAR(illuminate)] call FUNC(illuminate);