
All checks were successful
Build / Build (push) Successful in 28s
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.
68 lines
1.5 KiB
Plaintext
68 lines
1.5 KiB
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* Shows the message input
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [] call forge_client_phone_fnc_showMessageInput;
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
private _metaCtrls = [2023001, 2023002, 2023003];
|
|
|
|
{
|
|
ctrlShow [_x, true];
|
|
ctrlEnable [_x, true];
|
|
} forEach _metaCtrls;
|
|
|
|
private _ctrl01 = (findDisplay 202300) displayCtrl 202319;
|
|
_ctrl01 ctrlRemoveAllEventHandlers "ButtonClick";
|
|
_ctrl01 ctrlAddEventHandler ["ButtonClick", {
|
|
_this spawn FUNC(viewContacts);
|
|
|
|
ctrlShow [2023001, false];
|
|
ctrlShow [2023002, false];
|
|
ctrlShow [2023003, false];
|
|
ctrlShow [202304, false];
|
|
ctrlShow [202416, false];
|
|
ctrlEnable [202416, false];
|
|
}];
|
|
|
|
private _ctrl02 = (findDisplay 202300) displayCtrl 202416;
|
|
_ctrl02 ctrlRemoveAllEventHandlers "ButtonClick";
|
|
_ctrl02 ctrlAddEventHandler ["ButtonClick", {
|
|
private _reciever = ctrlText 2023002;
|
|
private _msg = ctrlText 202304;
|
|
[_reciever, _msg] spawn FUNC(sendMsg);
|
|
|
|
playSound "FORGE_msgSent";
|
|
|
|
ctrlShow [2023001, false];
|
|
ctrlShow [2023002, false];
|
|
ctrlShow [2023003, false];
|
|
ctrlShow [202304, false];
|
|
ctrlShow [202416, false];
|
|
ctrlEnable [202416, false];
|
|
}];
|
|
|
|
ctrlShow [202304, true];
|
|
ctrlShow [202416, true];
|
|
ctrlEnable [202416, true];
|
|
|
|
ctrlSetText [202307, "Messages"];
|
|
ctrlSetText [202308, "Send your message"];
|
|
|
|
private _reciever = _this select 0;
|
|
|
|
ctrlSetText [2023001, "TO"];
|
|
ctrlSetText [2023002, _reciever];
|
|
ctrlSetText [2023003, "MESSAGE"];
|
|
ctrlSetText [202304, ""]; |