mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #509 from acemod/vectornight
Illuminate vector numbers at night
This commit is contained in:
commit
51c3b88b00
@ -3,4 +3,14 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
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"
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
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 1317) ctrlSetText (_digits select 2);
|
||||
(_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 1313) ctrlSetText (_digits select 2);
|
||||
(_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"
|
||||
|
||||
((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 1313) ctrlSetText (_digits select 2);
|
||||
(_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 "";
|
||||
|
||||
};
|
||||
|
||||
[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 1317) ctrlSetText (_digits select 2);
|
||||
(_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 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 1313) ctrlSetText (_digits select 2);
|
||||
(_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 1317) ctrlSetText (_digits select 2);
|
||||
(_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"
|
||||
|
||||
((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 "";
|
||||
};
|
||||
};
|
||||
|
||||
[GVAR(illuminate)] call FUNC(illuminate);
|
||||
|
BIN
addons/vector/rsc/vector_0_illum.paa
Normal file
BIN
addons/vector/rsc/vector_0_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_1_illum.paa
Normal file
BIN
addons/vector/rsc/vector_1_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_2_illum.paa
Normal file
BIN
addons/vector/rsc/vector_2_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_3_illum.paa
Normal file
BIN
addons/vector/rsc/vector_3_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_4_illum.paa
Normal file
BIN
addons/vector/rsc/vector_4_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_5_illum.paa
Normal file
BIN
addons/vector/rsc/vector_5_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_6_illum.paa
Normal file
BIN
addons/vector/rsc/vector_6_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_7_illum.paa
Normal file
BIN
addons/vector/rsc/vector_7_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_8_illum.paa
Normal file
BIN
addons/vector/rsc/vector_8_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_9_illum.paa
Normal file
BIN
addons/vector/rsc/vector_9_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_a_illum.paa
Normal file
BIN
addons/vector/rsc/vector_a_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_b_illum.paa
Normal file
BIN
addons/vector/rsc/vector_b_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_c_illum.paa
Normal file
BIN
addons/vector/rsc/vector_c_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_center_illum.paa
Normal file
BIN
addons/vector/rsc/vector_center_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_crosshair_illum.paa
Normal file
BIN
addons/vector/rsc/vector_crosshair_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_d_illum.paa
Normal file
BIN
addons/vector/rsc/vector_d_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_degree_illum.paa
Normal file
BIN
addons/vector/rsc/vector_degree_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_e_illum.paa
Normal file
BIN
addons/vector/rsc/vector_e_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_f_illum.paa
Normal file
BIN
addons/vector/rsc/vector_f_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_g_illum.paa
Normal file
BIN
addons/vector/rsc/vector_g_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_i_illum.paa
Normal file
BIN
addons/vector/rsc/vector_i_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_l_illum.paa
Normal file
BIN
addons/vector/rsc/vector_l_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_minus_illum.paa
Normal file
BIN
addons/vector/rsc/vector_minus_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_n_illum.paa
Normal file
BIN
addons/vector/rsc/vector_n_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_o_illum.paa
Normal file
BIN
addons/vector/rsc/vector_o_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_p_illum.paa
Normal file
BIN
addons/vector/rsc/vector_p_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_plus_illum.paa
Normal file
BIN
addons/vector/rsc/vector_plus_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_r_illum.paa
Normal file
BIN
addons/vector/rsc/vector_r_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_t_illum.paa
Normal file
BIN
addons/vector/rsc/vector_t_illum.paa
Normal file
Binary file not shown.
BIN
addons/vector/rsc/vector_u_illum.paa
Normal file
BIN
addons/vector/rsc/vector_u_illum.paa
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user