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,170 +25,181 @@ class RscInGameUI {
w = 0;
h = 0;
};
class ACE_TargetingConstrains: RscControlsGroup {
idc = 699100;
class ACE_Targeting : RscControlsGroup {
idc = 6999;
x = "SafezoneX";
y = "SafezoneY";
w = "SafezoneW-SafezoneX";
h = "SafezoneH-SafezoneY";
enabled = 0;
class VScrollbar {
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
color[] = {1,1,1,0};
width = 0.001;
};
class HScrollbar {
color[] = {1,1,1,0};
height = 0.001;
};
y = "SafezoneY";
w = "SafezoneW";
h = "SafezoneH";
enabled = 1;
class Controls {
class Top: RscPicture {
idc = 699101;
text = "#(argb,8,8,3)color(1,1,1,1)";
colorText[] = {0.2941,0.2941,0.2941,1};
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.15*SafezoneH-SafezoneY";
w = "(3/4)*SafezoneH";
h = "0.21*SafezoneH";
};
class Bottom: Top {
idc = 699102;
y = "0.64*SafezoneH-SafezoneY";
};
class Left: Top {
idc = 699103;
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.36*SafezoneH-SafezoneY";
w = "0.31*(3/4)*SafezoneH";
h = "0.28*SafezoneH";
};
class Right: Left {
idc = 699104;
x = "((SafezoneW -(3/4)*SafezoneH)/2)+ 0.69*(3/4)*SafezoneH - SafezoneX";
};
class OpticsBorders: RscPicture {
idc = 699105;
text = PATHTOF(data\javelin_ui_border_ca.paa);
colorText[] = {0,0,0,1};
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.15*SafezoneH-SafezoneY";
w = "(3/4)*SafezoneH";
h = "0.7*SafezoneH";
};
};
};
class ACE_TargetingGate : ACE_TargetingConstrains {
idc = 699200;
class Controls {
class TargetingGateTL: ACE_TargetingConstrains {
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.15*SafezoneH - SafezoneY";
idc = 699201;
class ACE_TargetingConstrains: RscControlsGroup {
x = "SafezoneX";
y = "SafezoneY";
w = "SafezoneW-SafezoneX";
h = "SafezoneH-SafezoneY";
enabled = 1;
class VScrollbar {
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
color[] = {1,1,1,0};
width = 0.001;
};
class HScrollbar {
color[] = {1,1,1,0};
height = 0.001;
};
class Controls {
class LineH: RscLine {
idc = 699210;
x = "0";
y = "0";
w = "0.025*(3/4)*SafezoneH";
h = "0";
colorText[] = {0.8745,0.8745,0.8745,1};
class Top: RscPicture {
idc = 699101;
text = "#(argb,8,8,3)color(1,1,1,1)";
colorText[] = {0.2941,0.2941,0.2941,1};
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.15*SafezoneH-SafezoneY";
w = "(3/4)*SafezoneH";
h = "0.21*SafezoneH";
};
class LineV: LineH {
idc = 699211;
w = "0";
h = "0.025*SafezoneH";
class Bottom: Top {
idc = 699102;
y = "0.64*SafezoneH-SafezoneY";
};
class Left: Top {
idc = 699103;
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.36*SafezoneH-SafezoneY";
w = "0.31*(3/4)*SafezoneH";
h = "0.28*SafezoneH";
};
class Right: Left {
idc = 699104;
x = "((SafezoneW -(3/4)*SafezoneH)/2)+ 0.69*(3/4)*SafezoneH - SafezoneX";
};
class OpticsBorders: RscPicture {
idc = 699105;
text = PATHTOF(data\javelin_ui_border_ca.paa);
colorText[] = {0,0,0,1};
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.15*SafezoneH-SafezoneY";
w = "(3/4)*SafezoneH";
h = "0.7*SafezoneH";
};
};
};
class TargetingGateTR: TargetingGateTL {
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX + 0.975*(3/4)*SafezoneH";
y = "0.15*SafezoneH - SafezoneY";
idc = 699202;
class ACE_TargetingGate : ACE_TargetingConstrains {
idc = 699200;
class Controls {
class LineH: RscLine {
idc = 699220;
x = "0";
y = "0";
w = "0.025*(3/4)*SafezoneH";
h = "0";
colorText[] = {0.8745,0.8745,0.8745,1};
class TargetingGateTL: ACE_TargetingConstrains {
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.15*SafezoneH - SafezoneY";
idc = 699201;
class Controls {
class LineH: RscLine {
idc = 699210;
x = "0";
y = "0";
w = "0.025*(3/4)*SafezoneH";
h = "0";
colorText[] = {0.8745,0.8745,0.8745,1};
};
class LineV: LineH {
idc = 699211;
w = "0";
h = "0.025*SafezoneH";
};
};
};
class LineV: LineH {
idc = 699221;
x = "0.025*(3/4)*SafezoneH";
w = "0";
h = "0.025*SafezoneH";
class TargetingGateTR: TargetingGateTL {
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX + 0.975*(3/4)*SafezoneH";
y = "0.15*SafezoneH - SafezoneY";
idc = 699202;
class Controls {
class LineH: RscLine {
idc = 699220;
x = "0";
y = "0";
w = "0.025*(3/4)*SafezoneH";
h = "0";
colorText[] = {0.8745,0.8745,0.8745,1};
};
class LineV: LineH {
idc = 699221;
x = "0.025*(3/4)*SafezoneH";
w = "0";
h = "0.025*SafezoneH";
};
};
};
class TargetingGateBL: TargetingGateTL {
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.825*SafezoneH - SafezoneY";
idc = 699203;
class Controls {
class LineH: RscLine {
x = "0";
y = "0.025*SafezoneH";
w = "0.025*(3/4)*SafezoneH";
h = "0";
colorText[] = {0.8745,0.8745,0.8745,1};
};
class LineV: LineH {
y = "0";
w = "0";
h = "0.025*SafezoneH";
};
};
};
class TargetingGateBR: TargetingGateBL {
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX + 0.975*(3/4)*SafezoneH";
y = "0.825*SafezoneH - SafezoneY";
idc = 699204;
class Controls {
class LineH: RscLine {
x = "0";
y = "0.025*SafezoneH";
w = "0.025*(3/4)*SafezoneH";
h = "0";
colorText[] = {0.8745,0.8745,0.8745,1};
};
class LineV: LineH {
x = "0.025*(3/4)*SafezoneH";
y = "0";
w = "0";
h = "0.025*SafezoneH";
};
};
};
};
};
class TargetingGateBL: TargetingGateTL {
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.825*SafezoneH - SafezoneY";
idc = 699203;
class ACE_TargetingLines: ACE_TargetingConstrains {
idc = 699300;
class Controls {
class LineH: RscLine {
x = "0";
y = "0.025*SafezoneH";
w = "0.025*(3/4)*SafezoneH";
idc = 699301;
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.5*SafezoneH - SafezoneY";
w = "(3/4)*SafezoneH";
h = "0";
colorText[] = {0.8745,0.8745,0.8745,1};
};
class LineV: LineH {
y = "0";
class LineV: RscLine {
idc = 699302;
x = "0.5*SafezoneW - SafezoneX";
y = "0.15*SafezoneH - SafezoneY";
w = "0";
h = "0.025*SafezoneH";
};
};
};
class TargetingGateBR: TargetingGateBL {
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX + 0.975*(3/4)*SafezoneH";
y = "0.825*SafezoneH - SafezoneY";
idc = 699204;
class Controls {
class LineH: RscLine {
x = "0";
y = "0.025*SafezoneH";
w = "0.025*(3/4)*SafezoneH";
h = "0";
h = "0.7*SafezoneH";
colorText[] = {0.8745,0.8745,0.8745,1};
};
class LineV: LineH {
x = "0.025*(3/4)*SafezoneH";
y = "0";
w = "0";
h = "0.025*SafezoneH";
};
};
};
};
};
class ACE_TargetingLines: ACE_TargetingConstrains {
idc = 699300;
class Controls {
class LineH: RscLine {
idc = 699301;
x = "((SafezoneW -(3/4)*SafezoneH)/2) - SafezoneX";
y = "0.5*SafezoneH - SafezoneY";
w = "(3/4)*SafezoneH";
h = "0";
colorText[] = {0.8745,0.8745,0.8745,1};
};
class LineV: RscLine {
idc = 699302;
x = "0.5*SafezoneW - SafezoneX";
y = "0.15*SafezoneH - SafezoneY";
w = "0";
h = "0.7*SafezoneH";
colorText[] = {0.8745,0.8745,0.8745,1};
};
};
};
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)