mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
d1f0dc5e83
* Update CfgVehicles.hpp * Cargo cleanup * Update menu.hpp * Updated status effect key * Update fnc_onMenuOpen.sqf * Update fnc_onMenuOpen.sqf * fix comment from merge * nil interaction GVARs on menu close * fix carry bug * Fix floating objects in MP * Updated ace_cargoAdded doc * Fix progress bar prematurely stopping * Finer cursor object selection --------- Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
33 lines
732 B
Plaintext
33 lines
732 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: JasperRab
|
|
* Renames an object.
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* call ace_cargo_fnc_renameObject
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
private _display = uiNamespace getVariable QGVAR(menuDisplay);
|
|
|
|
if (isNil "_display") exitWith {};
|
|
|
|
private _ctrlEditText = ctrlText 100;
|
|
_ctrlEditText = _ctrlEditText select [0, 32];
|
|
|
|
// Check if custom name has been removed
|
|
if (_ctrlEditText isEqualTo "") then {
|
|
[LSTRING(clearedCustomName), 3] call EFUNC(common,displayTextStructured);
|
|
} else {
|
|
[[LSTRING(renamedObject), _ctrlEditText], 3] call EFUNC(common,displayTextStructured);
|
|
};
|
|
|
|
GVAR(interactionVehicle) setVariable [QGVAR(customName), _ctrlEditText, true];
|