mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Allow displayTextStructured to be moved via game layout settings (#6102)
* Allow displayTextStructured to be moved via game layout settings Fix #6081 * Fix comment, add upperleft bounds check
This commit is contained in:
parent
9e213f0e9a
commit
ba5d44b848
BIN
addons/common/UI/ace_hint_ca.paa
Normal file
BIN
addons/common/UI/ace_hint_ca.paa
Normal file
Binary file not shown.
@ -71,7 +71,7 @@ class CfgUIGrids {
|
||||
class Presets {
|
||||
class Arma3 {
|
||||
class Variables {
|
||||
grid_ACE_displayText[] = {{((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)),safeZoneY + 0.175 * safezoneH, (10 *(((safezoneW / safezoneH) min 1.2) / 40)), (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))}, "(((safezoneW / safezoneH) min 1.2) / 40)","((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"};
|
||||
grid_ACE_displayText[] = {{((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)),safeZoneY + 0.175 * safezoneH, (10 *(((safezoneW / safezoneH) min 1.2) / 40)), (3 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))}, "(((safezoneW / safezoneH) min 1.2) / 40)","((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"};
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -80,7 +80,7 @@ class CfgUIGrids {
|
||||
class grid_ACE_displayText {
|
||||
displayName = "ACE Hint";
|
||||
description = "Textual in game feedback to the player.";
|
||||
preview = "\a3\Ui_f\data\GUI\Cfg\UIGrids\grid_hint_ca.paa";
|
||||
preview = QPATHTOF(UI\ace_hint_ca.paa);
|
||||
saveToProfile[] = {0,1};
|
||||
};
|
||||
};
|
||||
|
@ -49,25 +49,23 @@ private _ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
|
||||
|
||||
_ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
|
||||
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
|
||||
/*
|
||||
// This does not function at the moment. Has been disabled until it fixed.
|
||||
|
||||
// Use profile settings from CfgUIGrids.hpp
|
||||
private _xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
private _yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||
private _wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
private _hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
*/
|
||||
|
||||
private _xPos = ((safezoneX + safezoneW) - (_width *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
private _yPos = safeZoneY + 0.175 * safezoneH;
|
||||
private _wPos = (_width *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
private _hPos = (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
|
||||
private _hPos = _size * (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
|
||||
|
||||
// Ensure still in bounds for large width/height
|
||||
_xPos = safezoneX max (_xPos min (safezoneX + safezoneW - _wPos));
|
||||
_yPos = safeZoneY max (_yPos min (safeZoneY + safezoneH - _hPos));
|
||||
|
||||
// Zeus Interface Open and Display would be under the "CREATE" list
|
||||
if (!isNull curatorCamera) then {
|
||||
_xPos = _xPos min ((safezoneX + safezoneW - 12.5 * (((safezoneW / safezoneH) min 1.2) / 40)) - _wPos);
|
||||
};
|
||||
|
||||
private _position = [_xPos, _yPos, _wPos, _size * _hPos];
|
||||
private _position = [_xPos, _yPos, _wPos, _hPos];
|
||||
|
||||
_ctrlHint ctrlSetPosition _position;
|
||||
_ctrlHint ctrlCommit 0;
|
||||
|
Loading…
Reference in New Issue
Block a user