Dogtags - Allow dogtags display to be repositioned (#6351)

* Allow dogtags display to be repositioned

* Update IGUI preview image

* Use common grid macros
This commit is contained in:
mharis001 2018-05-31 19:05:35 -04:00 committed by PabstMirror
parent 9618c2de95
commit 77b4ce7585
6 changed files with 49 additions and 22 deletions

View File

@ -0,0 +1,29 @@
class CfgUIGrids {
class IGUI {
class Presets {
class Arma3 {
class Variables {
GVAR(grid)[] = {
{
(safeZoneX + safeZoneW) - 12.9 * GUI_GRID_W,
safeZoneY + 0.175 * safeZoneH,
8 * GUI_GRID_W,
8 * GUI_GRID_H
},
GUI_GRID_W,
GUI_GRID_H
};
};
};
};
class Variables {
class GVAR(grid) {
displayName = COMPONENT_NAME;
description = CSTRING(IGUI_Description);
preview = QPATHTOF(ui\igui_preview.paa);
saveToProfile[] = {0, 1};
canResize = 0;
};
};
};
};

View File

@ -6,34 +6,30 @@ class RscTitles {
idd = -1;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tag),_this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tag),nil)]);
movingEnable = false;
duration = 5;
fadeIn = 0.2;
fadeOut = 0.2;
duration = 5;
movingEnable = 0;
class controls {
class background: RscPicture {
idc = 1000;
text = QUOTE(PATHTOF(data\dogtagSingle.paa));
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
x = profileNamespace getVariable ['TRIPLES(IGUI,GVAR(grid),X)', (safeZoneX + safeZoneW) - 12.9 * GUI_GRID_W];
y = profileNamespace getVariable ['TRIPLES(IGUI,GVAR(grid),Y)', safeZoneY + 0.175 * safeZoneH];
w = 8 * GUI_GRID_W;
h = 8 * GUI_GRID_H;
text = QPATHTOF(data\dogtagSingle.paa);
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0};
x = ((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 * (((safezoneW / safezoneH) min 1.2) / 40));
y = safeZoneY + 0.175 * safezoneH;
w = (8 * (((safezoneW / safezoneH) min 1.2) / 40));
h = (8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
font = "EtelkaMonospacePro";
};
class nickname: RscStructuredText {
idc = 1001;
text = "";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
sizeEx = GUI_GRID_H;
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0};
x = ((safezoneX + safezoneW) - (8.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 * (((safezoneW / safezoneH) min 1.2) / 40));
y = safeZoneY + 0.24 * safezoneH;
w = (5.9 * (((safezoneW / safezoneH) min 1.2) / 40));
h = (3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
x = 1.6 * GUI_GRID_W + (profileNamespace getVariable ['TRIPLES(IGUI,GVAR(grid),X)', (safeZoneX + safeZoneW) - 12.9 * GUI_GRID_W]);
y = 0.065 * safeZoneH + (profileNamespace getVariable ['TRIPLES(IGUI,GVAR(grid),Y)', safeZoneY + 0.175 * safeZoneH]);
w = 5.9 * GUI_GRID_W;
h = 3 * GUI_GRID_H;
font = "RobotoCondensed";
class Attributes {
font = "RobotoCondensed";
@ -48,13 +44,9 @@ class RscTitles {
};
};
class GVAR(doubleTag): GVAR(singleTag) {
idd = -1;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tag),_this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tag),nil)]);
class controls: controls {
class background: background {
text = QUOTE(PATHTOF(data\dogtagDouble.paa));
text = QPATHTOF(data\dogtagDouble.paa);
};
class nickname: nickname {
class Attributes: Attributes {

View File

@ -17,4 +17,5 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
#include "Dogtag.hpp"
#include "RscTitles.hpp"
#include "CfgUIGrids.hpp"

View File

@ -16,6 +16,8 @@
#include "\z\ace\addons\main\script_macros.hpp"
#include "\a3\ui_f\hpp\defineCommonGrids.inc"
#define DOGTAG_SHOW_DELAY 1
#define RUSTLING_SOUNDS [\

View File

@ -79,5 +79,8 @@
<Chinese>已經有人把他的兵籍牌拿走了...</Chinese>
<Chinesesimp>已经有人把他的兵籍牌拿走了...</Chinesesimp>
</Key>
<Key ID="STR_ACE_Dogtags_IGUI_Description">
<English>Onscreen display for checking dogtags</English>
</Key>
</Package>
</Project>

Binary file not shown.