Nighttime GUI for the ATragMX.

This commit is contained in:
ulteq 2015-05-26 12:32:37 +02:00
parent 3a810aba70
commit dc1bfa9c92
5 changed files with 14 additions and 3 deletions

View File

@ -152,7 +152,7 @@ class ATragMX_Display {
type=0;
font="TahomaB";
SizeEX=0.025;
idc=-1;
idc=720000;
style=48;
x=0.55*safezoneW+safezoneX-0.256;
y=0.265*safezoneH+safezoneY-0.1;
@ -160,7 +160,7 @@ class ATragMX_Display {
h=1.024*4/3;
colorBackground[]={1,1,1,1};
colorText[]={1,1,1,1};
text=PATHTOF(UI\atrag.paa);
text=PATHTOF(UI\atrag_d.paa);
};
class POWER: ATragMX_RscButton {
idc=-1;

Binary file not shown.

View File

@ -15,6 +15,9 @@
*/
#include "script_component.hpp"
#define __dsp (uiNamespace getVariable "ATragMX_Display")
#define __ctrlBackground (__dsp displayCtrl 720000)
if (GVAR(active)) exitWith { false };
if (underwater ACE_player) exitWith { false };
if (!("ACE_ATragMX" in (uniformItems ACE_player)) && !("ACE_ATragMX" in (vestItems ACE_player))) exitWith { false };
@ -49,4 +52,11 @@ GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer);
GVAR(active) = true;
GVAR(DialogPFH) = [{
if (!GVAR(active)) exitWith {
[_this select 1] call cba_fnc_removePerFrameHandler;
};
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
}, 60, []] call cba_fnc_addPerFrameHandler;
true

View File

@ -1,4 +1,5 @@
#include "script_component.hpp"
uiNamespace setVariable ['ATragMX_Display', nil];
GVAR(active) = false;
GVAR(active) = false;
[GVAR(DialogPFH)] call removePerFrameHandler;