mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Custom width displayTextStructured
Adding width as optional fourth parameter
This commit is contained in:
parent
91c6341bc8
commit
8b87f1b43a
@ -1,11 +1,12 @@
|
||||
/*
|
||||
* Author: commy2, Glowbal
|
||||
* Author: commy2, Glowbal, GitHawk
|
||||
* Display a structured text.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Text <ANY>
|
||||
* 1: Size of the textbox (default: 1.5) <NUMBER>
|
||||
* 2: Target Unit. Will only display if target is the player controlled object (default: ACE_player) <OBJECT>
|
||||
* 3: Custom Width <NUMBER><OPTIONAL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -14,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_text", ["_size", 1.5], ["_target", ACE_player]];
|
||||
params ["_text", ["_size", 1.5], ["_target", ACE_player], ["_width", 10]];
|
||||
|
||||
if (_target != ACE_player) exitWith {};
|
||||
|
||||
@ -52,9 +53,9 @@ private _wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10
|
||||
private _hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
*/
|
||||
|
||||
private _xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
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 = (10 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
private _wPos = (_width *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
private _hPos = (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
|
||||
|
||||
// Zeus Interface Open and Display would be under the "CREATE" list
|
||||
|
Loading…
Reference in New Issue
Block a user