mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
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:
parent
9618c2de95
commit
77b4ce7585
29
addons/dogtags/CfgUIGrids.hpp
Normal file
29
addons/dogtags/CfgUIGrids.hpp
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -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 {
|
@ -17,4 +17,5 @@ class CfgPatches {
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "Dogtag.hpp"
|
||||
#include "RscTitles.hpp"
|
||||
#include "CfgUIGrids.hpp"
|
||||
|
@ -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 [\
|
||||
|
@ -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>
|
||||
|
BIN
addons/dogtags/ui/igui_preview.paa
Normal file
BIN
addons/dogtags/ui/igui_preview.paa
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user