-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dogtags - Allow dogtags display to be repositioned #6351
Conversation
addons/dogtags/CfgUIGrids.hpp
Outdated
class Presets { | ||
class Arma3 { | ||
class Variables { | ||
grid_ACE_dogtags[] = {{"(safeZoneX + safeZoneW) - (12.9 * ((safeZoneW / safeZoneH) min 1.2) / 40)", "safeZoneY + 0.175 * safeZoneH", "8 * (((safeZoneW / safeZoneH) min 1.2) / 40)", "8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"}, "(((safeZoneW / safeZoneH) min 1.2) / 40)", "((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
#include "\a3\ui_f\hpp\defineCommonGrids.inc"
Then this line becomes:
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
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
addons/dogtags/RscTitles.hpp
Outdated
x = "profileNamespace getVariable ['IGUI_grid_ACE_dogtags_X', (safeZoneX + safeZoneW) - (12.9 * ((safeZoneW / safeZoneH) min 1.2) / 40)]"; | ||
y = "profileNamespace getVariable ['IGUI_grid_ACE_dogtags_Y', safeZoneY + 0.175 * safeZoneH]"; | ||
w = "8 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; | ||
h = "8 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this becomes:
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;
addons/dogtags/RscTitles.hpp
Outdated
x = "(1.6 * ((safeZoneW / safeZoneH) min 1.2) / 40) + (profileNamespace getVariable ['IGUI_grid_ACE_dogtags_X', (safeZoneX + safeZoneW) - (12.9 * ((safeZoneW / safeZoneH) min 1.2) / 40)])"; | ||
y = "(0.065 * safeZoneH) + (profileNamespace getVariable ['IGUI_grid_ACE_dogtags_Y', safeZoneY + 0.175 * safeZoneH])"; | ||
w = "5.9 * (((safeZoneW / safeZoneH) min 1.2) / 40)"; | ||
h = "3 * ((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this becomes:
x = (1.6 * GUI_GRID_W + (profileNamespace getVariable ['TRIPLES(IGUI,GVAR(grid),X)', (safeZoneX + safeZoneW) - GUI_GRID_W]);
y = (0.065 * safeZoneH) + (profileNamespace getVariable ['TRIPLES(IGUI,GVAR(grid),X)', safeZoneY + 0.175 * safeZoneH]);
w = 5.9 * GUI_GRID_W;
h = 3 * GUI_GRID_H;
I think this makes it much easier to read and comprehend.
* Allow dogtags display to be repositioned * Update IGUI preview image * Use common grid macros
When merged this pull request will:
Dogtag.hpp
toRscTitles.hpp
and clean up the file