mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Using common defines, further cleanup
This commit is contained in:
@ -1,12 +1,5 @@
|
|||||||
#include "\z\ace\addons\common\define.hpp"
|
#include "\z\ace\addons\common\define.hpp"
|
||||||
|
|
||||||
#define SIZEX ((safezoneW / safezoneH) min 1.2)
|
|
||||||
#define SIZEY (SIZEX / 1.2)
|
|
||||||
#define W_PART(num) (num * (SIZEX / 40))
|
|
||||||
#define H_PART(num) (num * (SIZEY / 25))
|
|
||||||
#define X_PART(num) (W_PART(num) + (safezoneX + (safezoneW - SIZEX)/2))
|
|
||||||
#define Y_PART(num) (H_PART(num) + (safezoneY + (safezoneH - SIZEY)/2))
|
|
||||||
|
|
||||||
class GVAR(overlay) {
|
class GVAR(overlay) {
|
||||||
|
|
||||||
idd = 12200;
|
idd = 12200;
|
||||||
@ -27,9 +20,9 @@ class GVAR(overlay) {
|
|||||||
blinkingPeriod = 0;
|
blinkingPeriod = 0;
|
||||||
|
|
||||||
x = safeZoneX;
|
x = safeZoneX;
|
||||||
y = safezoneY + H_PART(1);
|
y = safezoneY + TOOL_H;
|
||||||
w = W_PART(5);
|
w = TOOL_W * 2;
|
||||||
h = safeZoneH - H_PART(1);
|
h = safeZoneH - TOOL_H;
|
||||||
|
|
||||||
colorBorder[] = {1,1,1,1};
|
colorBorder[] = {1,1,1,1};
|
||||||
|
|
||||||
@ -136,24 +129,17 @@ class RscTitles {
|
|||||||
|
|
||||||
class controls {
|
class controls {
|
||||||
|
|
||||||
class TopBar: ACE_gui_staticBase {
|
class Name: ACE_gui_staticBase {
|
||||||
style = ST_CENTER;
|
|
||||||
x = safeZoneX;
|
|
||||||
y = safeZoneY;
|
|
||||||
w = safeZoneW;
|
|
||||||
h = H_PART(1);
|
|
||||||
colorBackground[] = {0.1,0.1,0.1,1};
|
|
||||||
};
|
|
||||||
|
|
||||||
class Name: TopBar {
|
|
||||||
idc = 1;
|
idc = 1;
|
||||||
x = safeZoneX;
|
x = safeZoneX;
|
||||||
w = safeZoneW * 0.2;
|
y = safeZoneY;
|
||||||
|
w = TOOL_W * 2;
|
||||||
|
h = TOOL_H;
|
||||||
style = ST_CENTER;
|
style = ST_CENTER;
|
||||||
shadow = 2;
|
shadow = 2;
|
||||||
colorText[]={1,1,1,1};
|
colorText[]={1,1,1,1};
|
||||||
colorBackground[] = {0,0,0,1};
|
colorBackground[] = {0.1,0.1,0.1,1};
|
||||||
sizeEx = H_PART(1);
|
sizeEx = TOOL_H;
|
||||||
};
|
};
|
||||||
|
|
||||||
class NameFrame: Name {
|
class NameFrame: Name {
|
||||||
@ -162,10 +148,8 @@ class RscTitles {
|
|||||||
|
|
||||||
class Mode: Name {
|
class Mode: Name {
|
||||||
idc = 2;
|
idc = 2;
|
||||||
x = safeZoneX + safeZoneW * 0.2;
|
x = safeZoneX + TOOL_W * 2;
|
||||||
w = safeZoneW * 0.05;
|
w = TOOL_W;
|
||||||
h = H_PART(1);
|
|
||||||
style = ST_CENTER;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModeFrame: Mode {
|
class ModeFrame: Mode {
|
||||||
@ -174,8 +158,7 @@ class RscTitles {
|
|||||||
|
|
||||||
class Focus: Mode {
|
class Focus: Mode {
|
||||||
idc = 6;
|
idc = 6;
|
||||||
x = safeZoneX + safeZoneW * 0.8;
|
x = safeZoneX + safeZoneW - TOOL_W;
|
||||||
style = ST_CENTER;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class FocusFrame: Focus {
|
class FocusFrame: Focus {
|
||||||
@ -184,8 +167,7 @@ class RscTitles {
|
|||||||
|
|
||||||
class Time: Mode {
|
class Time: Mode {
|
||||||
idc = 3;
|
idc = 3;
|
||||||
x = safeZoneX + safeZoneW * 0.75;
|
x = safeZoneX + safeZoneW - TOOL_W * 2;
|
||||||
style = ST_CENTER;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TimeFrame: Time {
|
class TimeFrame: Time {
|
||||||
@ -194,8 +176,7 @@ class RscTitles {
|
|||||||
|
|
||||||
class TimeAcc: Mode {
|
class TimeAcc: Mode {
|
||||||
idc = 5;
|
idc = 5;
|
||||||
x = safeZoneX + safeZoneW * 0.85;
|
x = safeZoneX + safeZoneW - TOOL_W * 3;
|
||||||
style = ST_CENTER;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TimeAccFrame: TimeAcc {
|
class TimeAccFrame: TimeAcc {
|
||||||
@ -204,8 +185,7 @@ class RscTitles {
|
|||||||
|
|
||||||
class Fov: Mode {
|
class Fov: Mode {
|
||||||
idc = 4;
|
idc = 4;
|
||||||
x = safezoneX + safezoneW * 0.9;
|
x = safezoneX + safezoneW - TOOL_W * 4;
|
||||||
style = ST_CENTER;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class FovFrame: Fov {
|
class FovFrame: Fov {
|
||||||
@ -214,8 +194,7 @@ class RscTitles {
|
|||||||
|
|
||||||
class Velocity: Mode {
|
class Velocity: Mode {
|
||||||
idc = 0;
|
idc = 0;
|
||||||
x = safeZoneX + safeZoneW * 0.95;
|
x = safeZoneX + safeZoneW - TOOL_W * 5;
|
||||||
y = safeZoneY;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class VelocityFrame: Velocity {
|
class VelocityFrame: Velocity {
|
||||||
@ -238,68 +217,58 @@ class RscTitles {
|
|||||||
|
|
||||||
class BG: ACE_gui_staticBase {
|
class BG: ACE_gui_staticBase {
|
||||||
style = ST_CENTER;
|
style = ST_CENTER;
|
||||||
x = 0.5 - safeZoneW * 0.25;
|
x = COMPASS_X;
|
||||||
y = safeZoneY;
|
y = safeZoneY;
|
||||||
w = safeZoneW * 0.5;
|
w = COMPASS_W;
|
||||||
h = H_PART(1);
|
h = TOOL_H;
|
||||||
colorBackground[] = {0.1,0.1,0.1,1};
|
colorBackground[] = {0.1,0.1,0.1,1};
|
||||||
};
|
};
|
||||||
|
|
||||||
class 0_90: ACE_gui_backgroundBase {
|
class 0_90: ACE_gui_backgroundBase {
|
||||||
idc = 1;
|
idc = 90;
|
||||||
x = 0.5;
|
x = 0.5;
|
||||||
y = safeZoneY;
|
y = safeZoneY;
|
||||||
w = safeZoneW * 0.25;
|
w = COMPASS_W * 0.5;
|
||||||
h = H_PART(1);
|
h = TOOL_H;
|
||||||
text = "A3\ui_f_curator\data\cfgIngameUI\compass\texture180_ca.paa";
|
text = "A3\ui_f_curator\data\cfgIngameUI\compass\texture180_ca.paa";
|
||||||
};
|
};
|
||||||
|
|
||||||
class 90_180: 0_90 {
|
class 90_180: 0_90 {
|
||||||
idc = 2;
|
idc = 91;
|
||||||
x = 0.5 + safezoneW * 0.25;
|
x = 0.5 + COMPASS_W * 0.5;
|
||||||
text = "A3\ui_f_curator\data\cfgIngameUI\compass\texture270_ca.paa";
|
text = "A3\ui_f_curator\data\cfgIngameUI\compass\texture270_ca.paa";
|
||||||
};
|
};
|
||||||
|
|
||||||
class 180_270: 0_90 {
|
class 180_270: 0_90 {
|
||||||
idc = 3;
|
idc = 92;
|
||||||
x = 0.5 + safezoneW * 0.5;
|
x = 0.5 + COMPASS_W;
|
||||||
text = "A3\ui_f_curator\data\cfgIngameUI\compass\texture0_ca.paa";
|
text = "A3\ui_f_curator\data\cfgIngameUI\compass\texture0_ca.paa";
|
||||||
};
|
};
|
||||||
|
|
||||||
class 270_0: 0_90 {
|
class 270_0: 0_90 {
|
||||||
idc = 4;
|
idc = 93;
|
||||||
x = 0.5 + safeZoneW * 0.75;
|
x = 0.5 + COMPASS_W * 1.5;
|
||||||
text = "A3\ui_f_curator\data\cfgIngameUI\compass\texture90_ca.paa";
|
text = "A3\ui_f_curator\data\cfgIngameUI\compass\texture90_ca.paa";
|
||||||
};
|
};
|
||||||
|
|
||||||
class Post: ACE_gui_staticBase {
|
class Post: BG {
|
||||||
style = ST_CENTER;
|
x = 0.5 - COMPASS_W / 360;
|
||||||
x = 0.5;
|
w = COMPASS_W / 180;
|
||||||
y = safeZoneY;
|
|
||||||
w = W_PART(0.1);
|
|
||||||
h = H_PART(1);
|
|
||||||
colorBackground[]={1,0,0,1};
|
colorBackground[]={1,0,0,1};
|
||||||
};
|
};
|
||||||
|
|
||||||
class LeftBlocker: ACE_gui_staticBase {
|
class LeftBlocker: Post {
|
||||||
style = ST_CENTER;
|
x = safeZoneX;
|
||||||
x = 0.5 - safezoneW * 0.5;
|
w = COMPASS_X - safeZoneX;
|
||||||
y = safeZoneY;
|
|
||||||
w = safeZoneW * 0.25;
|
|
||||||
h = H_PART(1);
|
|
||||||
colorBackground[] = {0.1,0.1,0.1,1};
|
colorBackground[] = {0.1,0.1,0.1,1};
|
||||||
};
|
};
|
||||||
|
|
||||||
class RightBlocker: LeftBlocker {
|
class RightBlocker: LeftBlocker {
|
||||||
x = 0.5 + safeZoneW * 0.25;
|
x = 0.5 + COMPASS_W * 0.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Frame: ACE_gui_staticBase {
|
class Frame: BG {
|
||||||
style = ST_FRAME;
|
style = ST_FRAME;
|
||||||
x = 0.5 - safeZoneW * 0.25;
|
|
||||||
y = safeZoneY;
|
|
||||||
w = safeZoneW * 0.5;
|
|
||||||
h = H_PART(1);
|
|
||||||
shadow=2;
|
shadow=2;
|
||||||
colorText[]={1,1,1,1};
|
colorText[]={1,1,1,1};
|
||||||
};
|
};
|
||||||
|
@ -20,19 +20,15 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define RESUNITS_X safeZoneW / 100
|
|
||||||
#define CENTRE safeZoneX + safeZoneW / 2
|
|
||||||
#define COMPASS_W RESUNITS_X * 20
|
|
||||||
#define COMPASS_X CENTRE - COMPASS_W / 2
|
|
||||||
#define ARC_W COMPASS_W / 2
|
#define ARC_W COMPASS_W / 2
|
||||||
#define DEGUNIT COMPASS_W / 180
|
#define DEGUNIT COMPASS_W / 180
|
||||||
|
|
||||||
_dialog = _this select 0;
|
PARAMS_1(_dialog);
|
||||||
|
|
||||||
_Q1 = _dialog displayCtrl 1;
|
_Q1 = _dialog displayCtrl 90;
|
||||||
_Q2 = _dialog displayCtrl 2;
|
_Q2 = _dialog displayCtrl 91;
|
||||||
_Q3 = _dialog displayCtrl 3;
|
_Q3 = _dialog displayCtrl 92;
|
||||||
_Q4 = _dialog displayCtrl 4;
|
_Q4 = _dialog displayCtrl 93;
|
||||||
_qOrder = [];
|
_qOrder = [];
|
||||||
|
|
||||||
_dir = if GVAR(cameraOn) then {getDir GVAR(cam)} else {getDir GVAR(unit)};
|
_dir = if GVAR(cameraOn) then {getDir GVAR(cam)} else {getDir GVAR(unit)};
|
||||||
@ -40,9 +36,9 @@ _angleFromCentre = _dir - floor(_dir / 90) * 90;
|
|||||||
_leftEdgePos = _angleFromCentre * DEGUNIT;
|
_leftEdgePos = _angleFromCentre * DEGUNIT;
|
||||||
|
|
||||||
_positions = [
|
_positions = [
|
||||||
[CENTRE - _leftEdgePos - ARC_W, safeZoneY],
|
[0.5 - _leftEdgePos - ARC_W, safeZoneY],
|
||||||
[CENTRE - _leftEdgePos, safeZoneY],
|
[0.5 - _leftEdgePos, safeZoneY],
|
||||||
[CENTRE - _leftEdgePos + ARC_W, safeZoneY],
|
[0.5 - _leftEdgePos + ARC_W, safeZoneY],
|
||||||
[0, safeZoneY - 1]
|
[0, safeZoneY - 1]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* None <NIL>
|
* None <NIL>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [player, _killer] call ace_spectator_fnc_setSpectator
|
* [_killer] call ace_spectator_fnc_setSpectator
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
@ -9,4 +9,20 @@
|
|||||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_SPECTATOR
|
#define DEBUG_SETTINGS DEBUG_SETTINGS_SPECTATOR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
#include "\z\ace\addons\main\script_macros.hpp"
|
||||||
|
|
||||||
|
// Interface grid
|
||||||
|
#define SIZEX ((safezoneW / safezoneH) min 1.2)
|
||||||
|
#define SIZEY (SIZEX / 1.2)
|
||||||
|
#define W_PART(num) (num * (SIZEX / 40))
|
||||||
|
#define H_PART(num) (num * (SIZEY / 25))
|
||||||
|
#define X_PART(num) (W_PART(num) + (safezoneX + (safezoneW - SIZEX)/2))
|
||||||
|
#define Y_PART(num) (H_PART(num) + (safezoneY + (safezoneH - SIZEY)/2))
|
||||||
|
|
||||||
|
// Interface tools
|
||||||
|
#define TOOL_H H_PART(1)
|
||||||
|
#define TOOL_W W_PART(5)
|
||||||
|
|
||||||
|
// Interface compass
|
||||||
|
#define COMPASS_W (TOOL_W * 2.5)
|
||||||
|
#define COMPASS_X (0.5 - (COMPASS_W * 0.5))
|
||||||
|
Reference in New Issue
Block a user