client/addons/phone/functions/fnc_delMsg.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

44 lines
1.8 KiB
Plaintext

#include "..\script_component.hpp"
/*
* Author: IDSolutions
* Deletes a message from the message list
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call forge_client_phone_fnc_delMsg;
*
* Public: Yes
*/
private _myDialog = findDisplay 202300;
private _ctrl01 = _myDialog displayCtrl 202302;
_myDialog displayRemoveEventHandler ["KeyDown", FORGE_DeleteMsg];
if (lbCurSel _ctrl01 == -1) exitWith {};
private _homeScreenBgBtns = [202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209];
private _homeScreenBtns = [202310, 202311, 202312, 202313, 202314, 202315, 202316, 202317, 202318];
private _viewMessagesBtns = [202201, 2023001, 2023002, 2023003, 202302, 202305, 202306, 202307, 202308];
{ ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBgBtns;
{ ctrlShow [_x, true]; ctrlEnable [_x, true]; } forEach _homeScreenBtns;
{ ctrlShow [_x, false] } forEach _viewMessagesBtns;
ctrlShow [202319, false];
ctrlEnable [202319, false];
// [player getVariable ["FORGE_Phone_Number", "unknown"], lbCurSel _ctrl01] remoteExec ["db_fnc_listrem", 2, false];
// ["listrem", player getVariable ["FORGE_Phone_Number", "unknown"], "", lbCurSel _ctrl01, [], "", false] spawn dragonfly_db_fnc_addTask;
["listrem", player getVariable ["FORGE_Phone_Number", "unknown"], "", lbCurSel _ctrl01, [], "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
uiSleep 1;
// [player getVariable ["FORGE_Phone_Number", "unknown"], player, "forge_client_phone_fnc_addMsg", true] remoteExec ["db_fnc_listload", 2, false];
// ["listrng", player getVariable ["FORGE_Phone_Number", "unknown"], "", -1, [], "forge_client_phone_fnc_addMsg", true] spawn dragonfly_db_fnc_addTask;
["listrng", player getVariable ["FORGE_Phone_Number", "unknown"], "", -1, [], "forge_client_phone_fnc_addMsg", true, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false];