Target gating implemented.

This commit is contained in:
jaynus 2015-04-11 11:17:34 -07:00
parent aa53a1815c
commit 458958ef09
4 changed files with 158 additions and 141 deletions

View File

@ -12,7 +12,7 @@ class RscLine;
class RscInGameUI {
class RscOptics_titan {
idd = 300;
controls[] = {"ACE_javelin_elements_group", "CA_Distance", "ACE_TargetingConstrains", "ACE_TargetingGate", "ACE_TargetingLines"};
controls[] = {"ACE_javelin_elements_group", "CA_Distance", "ACE_Targeting" }; //, "ACE_TargetingConstrains", "ACE_TargetingGate", "ACE_TargetingLines"};
onLoad = QUOTE(_this call FUNC(onOpticLoad));
onUnload = "uiNameSpace setVariable ['ACE_RscOptics_javelin',nil];";
@ -25,14 +25,23 @@ class RscInGameUI {
w = 0;
h = 0;
};
class ACE_Targeting : RscControlsGroup {
idc = 6999;
x = "SafezoneX";
y = "SafezoneY";
w = "SafezoneW";
h = "SafezoneH";
enabled = 1;
class Controls {
class ACE_TargetingConstrains: RscControlsGroup {
idc = 699100;
x = "SafezoneX";
y = "SafezoneY";
w = "SafezoneW-SafezoneX";
h = "SafezoneH-SafezoneY";
enabled = 0;
enabled = 1;
class VScrollbar {
autoScrollSpeed = -1;
autoScrollDelay = 5;
@ -167,6 +176,7 @@ class RscInGameUI {
};
};
class ACE_TargetingLines: ACE_TargetingConstrains {
idc = 699300;
class Controls {
@ -188,7 +198,8 @@ class RscInGameUI {
};
};
};
};
};
class ACE_javelin_elements_group: RscControlsGroup
{
x = "SafezoneX";

View File

@ -61,6 +61,7 @@ if (isNull _newTarget) then {
__JavelinIGUISeek ctrlSetTextColor __ColorGray;
__JavelinIGUINFOV ctrlSetTextColor __ColorGreen;
__JavelinIGUITargeting ctrlShow false;
__JavelinIGUITargetingConstrains ctrlShow false;
__JavelinIGUITargetingGate ctrlShow false;
__JavelinIGUITargetingLines ctrlShow false;
@ -87,6 +88,7 @@ if (isNull _newTarget) then {
__JavelinIGUISeek ctrlSetTextColor __ColorGreen;
__JavelinIGUINFOV ctrlSetTextColor __ColorNull;
__JavelinIGUITargeting ctrlShow true;
__JavelinIGUITargetingConstrains ctrlShow true;
__JavelinIGUITargetingGate ctrlShow true;
__JavelinIGUITargetingLines ctrlShow true;

View File

@ -2,6 +2,7 @@
#include "script_component.hpp"
TRACE_1("enter", _this);
if((count _this) > 0) then {
uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0];
};
@ -11,6 +12,7 @@ ACE_player setVariable ["ace_missileguidance_target",nil, false];
__JavelinIGUISeek ctrlSetTextColor __ColorGray;
__JavelinIGUINFOV ctrlSetTextColor __ColorGray;
__JavelinIGUITargeting ctrlShow false;
__JavelinIGUITargetingConstrains ctrlShow false;
__JavelinIGUITargetingGate ctrlShow false;
__JavelinIGUITargetingLines ctrlShow false;

View File

@ -19,6 +19,8 @@
#define __JavelinIGUI (uinamespace getVariable "ACE_RscOptics_javelin")
// Custom controls
#define __JavelinIGUITargeting (__JavelinIGUI displayCtrl 6999)
#define __JavelinIGUISeek (__JavelinIGUI displayCtrl 699000)
#define __JavelinIGUITop (__JavelinIGUI displayCtrl 699001)
#define __JavelinIGUIDir (__JavelinIGUI displayCtrl 699002)