2016-06-06 15:22:17 +00:00
|
|
|
|
|
|
|
class RscOpticsValue;
|
|
|
|
class RscMapControl;
|
|
|
|
class RscText;
|
|
|
|
|
|
|
|
class RscInGameUI {
|
|
|
|
class RscUnitInfo;
|
2016-06-06 17:22:24 +00:00
|
|
|
class GVAR(RscUnitInfo): RscUnitInfo {
|
2016-06-06 21:14:19 +00:00
|
|
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); {((_this select 0) displayCtrl _x) ctrlShow false} forEach [ARR_4(IDC_RETICLE,IDC_BODY,IDC_BLACK_LEFT,IDC_BLACK_RIGHT)]);
|
|
|
|
controls[] = {"CA_FOVMode","ScriptedReticleHelper","trippleHeadLeft","trippleHeadRight","Reticle","Body"}; // don't change this order
|
2016-06-06 15:22:17 +00:00
|
|
|
|
|
|
|
class CA_FOVMode: RscOpticsValue { // idea by Taosenai. Apparently this can be used via isNil check to determine wheter the scope or the kolimator is used
|
|
|
|
idc = 154;
|
|
|
|
style = 2;
|
|
|
|
colorText[] = {0,0,0,0};
|
|
|
|
x = 0;
|
|
|
|
y = 0;
|
|
|
|
w = 0;
|
|
|
|
h = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ScriptedReticleHelper: RscMapControl {
|
|
|
|
onDraw = QUOTE(ctrlParent (_this select 0) call FUNC(animateReticle));
|
|
|
|
idc = -1;
|
|
|
|
w = 0;
|
|
|
|
h = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
class Reticle: RscText {
|
|
|
|
idc = IDC_RETICLE;
|
|
|
|
style = 48;
|
|
|
|
size = 0;
|
|
|
|
sizeEx = 1;
|
2016-06-06 17:22:24 +00:00
|
|
|
text = QPATHTOF(rsc\spotting_scope_reticle_co.paa);
|
2016-06-06 15:22:17 +00:00
|
|
|
colorText[] = {1,1,1,1};
|
|
|
|
colorBackground[] = {0,0,0,0};
|
|
|
|
x = POS_X;
|
|
|
|
y = POS_Y;
|
|
|
|
w = POS_W;
|
|
|
|
h = POS_H;
|
|
|
|
};
|
|
|
|
|
|
|
|
class Body: Reticle {
|
|
|
|
idc = IDC_BODY;
|
2016-06-06 17:22:24 +00:00
|
|
|
text = QPATHTOF(rsc\spotting_scope_body_co.paa);
|
2016-06-06 15:22:17 +00:00
|
|
|
x = POS_X;
|
|
|
|
y = POS_Y;
|
|
|
|
w = POS_W;
|
|
|
|
h = POS_H;
|
|
|
|
};
|
|
|
|
|
|
|
|
//These are just black side panels to cover the areas that the optics p3d doesn't cover
|
|
|
|
//It will ONLY effect tripple head users as (safezoneX == safeZoneXAbs) for everyone else
|
|
|
|
class trippleHeadLeft: RscText {
|
|
|
|
idc = IDC_BLACK_LEFT;
|
|
|
|
x = "safeZoneXAbs";
|
|
|
|
Y = "safezoneY";
|
2016-06-06 21:14:19 +00:00
|
|
|
W = "(-safeZoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))";
|
2016-06-06 15:22:17 +00:00
|
|
|
H = "safeZoneH";
|
|
|
|
colorBackground[] = {0,0,0,1};
|
|
|
|
};
|
|
|
|
|
|
|
|
class trippleHeadRight: trippleHeadLeft {
|
|
|
|
idc = IDC_BLACK_RIGHT;
|
2016-06-06 21:14:19 +00:00
|
|
|
x = "safeZoneXAbs + safeZoneWAbs - (-safeZoneX - safeZoneXABS) * ((getResolution select 4)/(16/3))";
|
2016-06-06 15:22:17 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|