client/addons/phone/functions/fnc_openPhone.sqf
Jacob Schmidt d474b3676a
All checks were successful
Build / Build (push) Successful in 28s
Refactor: Standardize function descriptions and variable handling
This commit refactors several client-side functions to improve code consistency and readability.

- Standardizes function descriptions by removing redundant "Function: forge_client..." prefixes and "[Description]" sections, focusing on concise descriptions of the function's purpose.
- Updates variable handling in arsenal functions to use GVAR and EGVARS for default values, improving consistency and reducing code duplication.
- Removes the bank init function as it is no longer needed.
- Adds a done variable to the preinit file.
2025-05-25 11:30:26 -05:00

42 lines
1.5 KiB
Plaintext

#include "..\script_component.hpp"
/*
* Author: IDSolutions
* Opens the phone
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call forge_client_phone_fnc_openPhone;
*
* Public: Yes
*/
private _defaultTheme = ["bg_dark01", "\@forge\userconfig\backgrounds\bgdark_01.paa"];
private _theme = GETVAR(profileNamespace,FORGE_PhoneTheme,_defaultTheme);
private _themeBackground = _theme select 1;
private _dayTime = [(date select 3), (date select 4)] call FUNC(dateToHhMm);
private _dialog = createDialog "RscPhone";
private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209];
private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318];
private _dialpadBgBtns = [202210, 202211, 202212, 202213, 202214, 202215, 202216, 202217, 202218, 202219, 202220, 202221];
private _dialpadBtns = [202401, 202402, 202403, 202404, 202405, 202406, 202407, 202408, 202409, 202410, 202411, 202412, 202413];
private _displayCtrls = [202201, 202210, 202211, 202212, 202213, 202214, 202215, 202216, 202217, 202218, 202219, 202220, 202221, 202222, 202223, 202224, 202302, 202303, 202304, 202305, 202306, 202307, 202308, 202309, 202319, 2023001, 2023002, 2023003, 2023004, 2023005, 2023006, 202401, 202402, 202403, 202404, 202405, 202406, 202407, 202408, 202409, 202410, 202411, 202412, 202413, 202414, 202415, 202416];
disableSerialization;
ctrlSetText [202200, _themeBackground];
{
ctrlShow [_x, false];
} forEach _displayCtrls;
ctrlSetText [202301, (_dayTime select 0) + ":" + (_dayTime select 1)];