mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Dynamic HUD feature - http://pastebin.com/XPLwqRgd
This commit is contained in:
parent
e04f4d2e69
commit
a21ca947f2
@ -1,8 +1,8 @@
|
||||
/*%FSM<COMPILE "F:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, Epoch Login">*/
|
||||
/*%FSM<COMPILE "D:\SteamLibrary\steamapps\common\Arma 3 Tools\FSMEditor\scriptedFSM.cfg, Epoch Login">*/
|
||||
/*%FSM<HEAD>*/
|
||||
/*
|
||||
item0[] = {"INIT",0,4346,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"};
|
||||
item1[] = {"FINISH",1,250,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"};
|
||||
item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"};
|
||||
item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"};
|
||||
item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"};
|
||||
item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"};
|
||||
item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"};
|
||||
@ -183,8 +183,8 @@ link93[] = {82,76};
|
||||
link94[] = {83,16};
|
||||
link95[] = {83,22};
|
||||
link96[] = {84,31};
|
||||
globals[] = {0.000000,0,0,0,0,640,480,1,247,6316128,1,-328.063843,350.313202,140.961456,-412.815704,813,880,1};
|
||||
window[] = {2,-1,-1,-1,-1,897,-1550,-566,130,3,831};
|
||||
globals[] = {0.000000,0,0,0,0,640,480,1,247,6316128,1,-534.004700,883.834412,1895.573975,986.017029,1287,884,1};
|
||||
window[] = {2,-1,-1,-32000,-32000,1149,2931,3915,382,3,1305};
|
||||
*//*%FSM</HEAD>*/
|
||||
class FSM
|
||||
{
|
||||
@ -195,6 +195,7 @@ class FSM
|
||||
class INIT
|
||||
{
|
||||
name = "INIT";
|
||||
itemno = 0;
|
||||
init = /*%FSM<STATEINIT""">*/"titleCut ["""", ""BLACK FADED"", 1337];" \n
|
||||
"0 fadeSound 0;" \n
|
||||
"//player enableSimulation false;" \n
|
||||
@ -219,6 +220,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 62;
|
||||
priority = 0.000000;
|
||||
to="Process_1";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -233,6 +235,7 @@ class FSM
|
||||
class FINISH
|
||||
{
|
||||
name = "FINISH";
|
||||
itemno = 1;
|
||||
init = /*%FSM<STATEINIT""">*/"[] spawn {" \n
|
||||
" disableSerialization;" \n
|
||||
" waitUntil{!isNull (findDisplay 46)};" \n
|
||||
@ -240,7 +243,7 @@ class FSM
|
||||
" {" \n
|
||||
" _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n
|
||||
" } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n
|
||||
" " \n
|
||||
" call epoch_dynamicHUD_start; " \n
|
||||
" player switchMove """";" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
@ -272,6 +275,7 @@ class FSM
|
||||
class Version_Check
|
||||
{
|
||||
name = "Version_Check";
|
||||
itemno = 3;
|
||||
init = /*%FSM<STATEINIT""">*/"if (_debug) then {" \n
|
||||
" diag_log ""EPOCH-LOGIN: Version Check"";" \n
|
||||
"};" \n
|
||||
@ -307,6 +311,7 @@ class FSM
|
||||
/*%FSM<LINK "Wrong_Version">*/
|
||||
class Wrong_Version
|
||||
{
|
||||
itemno = 7;
|
||||
priority = 10.000000;
|
||||
to="ERROR_Wrong_Version";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -325,6 +330,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 44;
|
||||
priority = 0.000000;
|
||||
to="Arma_Version_Che";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -339,6 +345,7 @@ class FSM
|
||||
class Check_Player_UID
|
||||
{
|
||||
name = "Check_Player_UID";
|
||||
itemno = 5;
|
||||
init = /*%FSM<STATEINIT""">*/"if (_debug) then {" \n
|
||||
" diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n
|
||||
"};" \n
|
||||
@ -352,6 +359,7 @@ class FSM
|
||||
/*%FSM<LINK "PlayerUID_Okay">*/
|
||||
class PlayerUID_Okay
|
||||
{
|
||||
itemno = 6;
|
||||
priority = 10.000000;
|
||||
to="Check_Server_1";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/"!isNil ""_playerUID"""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -362,6 +370,7 @@ class FSM
|
||||
/*%FSM<LINK "Empty_PlayerUID">*/
|
||||
class Empty_PlayerUID
|
||||
{
|
||||
itemno = 12;
|
||||
priority = 0.000000;
|
||||
to="ERROR_PlayerUID";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -376,6 +385,7 @@ class FSM
|
||||
class ERROR_Wrong_Version
|
||||
{
|
||||
name = "ERROR_Wrong_Version";
|
||||
itemno = 9;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = ""You have an outdated version of Epoch"";" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -390,6 +400,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -404,6 +415,7 @@ class FSM
|
||||
class Disconnect
|
||||
{
|
||||
name = "Disconnect";
|
||||
itemno = 10;
|
||||
init = /*%FSM<STATEINIT""">*/"endLoadingScreen;" \n
|
||||
"1338 cutText [_msg,""PLAIN"",0]; " \n
|
||||
"deleteVehicle player;" \n
|
||||
@ -415,6 +427,7 @@ class FSM
|
||||
/*%FSM<LINK "Check_if_Player">*/
|
||||
class Check_if_Player
|
||||
{
|
||||
itemno = 28;
|
||||
priority = 0.000000;
|
||||
to="Reject_without_B";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -429,6 +442,7 @@ class FSM
|
||||
class ERROR_PlayerUID
|
||||
{
|
||||
name = "ERROR_PlayerUID";
|
||||
itemno = 13;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -443,6 +457,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -457,6 +472,7 @@ class FSM
|
||||
class Setup_Player_Var
|
||||
{
|
||||
name = "Setup_Player_Var";
|
||||
itemno = 17;
|
||||
init = /*%FSM<STATEINIT""">*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n
|
||||
"{" \n
|
||||
" missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n
|
||||
@ -472,6 +488,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 24;
|
||||
priority = 0.000000;
|
||||
to="Setup_EH_s_and_H";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -486,6 +503,7 @@ class FSM
|
||||
class Request_Hive
|
||||
{
|
||||
name = "Request_Hive";
|
||||
itemno = 18;
|
||||
init = /*%FSM<STATEINIT""">*/"_myTime = diag_tickTime;" \n
|
||||
"" \n
|
||||
"[player] remoteExec [""EPOCH_server_checkPlayer"",2];" \n
|
||||
@ -499,6 +517,7 @@ class FSM
|
||||
/*%FSM<LINK "Hive_Response">*/
|
||||
class Hive_Response
|
||||
{
|
||||
itemno = 75;
|
||||
priority = 0.000000;
|
||||
to="Process_2";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -510,6 +529,7 @@ class FSM
|
||||
/*%FSM<LINK "Timeout_No_Respo">*/
|
||||
class Timeout_No_Respo
|
||||
{
|
||||
itemno = 19;
|
||||
priority = 0.000000;
|
||||
to="ERROR_Server_not_3";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -524,6 +544,7 @@ class FSM
|
||||
class ERROR_Server_not
|
||||
{
|
||||
name = "ERROR_Server_not";
|
||||
itemno = 20;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -538,6 +559,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -552,6 +574,7 @@ class FSM
|
||||
class ERROR_Wrong_Server
|
||||
{
|
||||
name = "ERROR_Wrong_Server";
|
||||
itemno = 25;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -566,6 +589,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -580,6 +604,7 @@ class FSM
|
||||
class Setup_Player_Obj
|
||||
{
|
||||
name = "Setup_Player_Obj";
|
||||
itemno = 27;
|
||||
init = /*%FSM<STATEINIT""">*/"_ply = player;" \n
|
||||
"_group = group player;" \n
|
||||
"" \n
|
||||
@ -602,6 +627,7 @@ class FSM
|
||||
/*%FSM<LINK "Timeout_">*/
|
||||
class Timeout_
|
||||
{
|
||||
itemno = 66;
|
||||
priority = 0.000000;
|
||||
to="ERROR_Player_Setup";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -612,6 +638,7 @@ class FSM
|
||||
/*%FSM<LINK "new_player_____p">*/
|
||||
class new_player_____p
|
||||
{
|
||||
itemno = 49;
|
||||
priority = 0.000000;
|
||||
to="Setup_Player_Var";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -626,6 +653,7 @@ class FSM
|
||||
class Display_Message
|
||||
{
|
||||
name = "Display_Message";
|
||||
itemno = 33;
|
||||
init = /*%FSM<STATEINIT""">*/"[] spawn {" \n
|
||||
" waitUntil{!isNull (findDisplay 46)};" \n
|
||||
" (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n
|
||||
@ -639,6 +667,7 @@ class FSM
|
||||
/*%FSM<LINK "Display_Message">*/
|
||||
class Display_Message
|
||||
{
|
||||
itemno = 26;
|
||||
priority = 0.000000;
|
||||
to="Disconnect";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -653,6 +682,7 @@ class FSM
|
||||
class Check_Server
|
||||
{
|
||||
name = "Check_Server";
|
||||
itemno = 35;
|
||||
init = /*%FSM<STATEINIT""">*/"_myTime = diag_tickTime;" \n
|
||||
"if (_debug) then {" \n
|
||||
" diag_log ""EPOCH-LOGIN: Check Server"";" \n
|
||||
@ -665,6 +695,7 @@ class FSM
|
||||
/*%FSM<LINK "Server_not_worki">*/
|
||||
class Server_not_worki
|
||||
{
|
||||
itemno = 36;
|
||||
priority = 10.000000;
|
||||
to="ERROR_Server_not_1";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -676,6 +707,7 @@ class FSM
|
||||
/*%FSM<LINK "Server_Okay">*/
|
||||
class Server_Okay
|
||||
{
|
||||
itemno = 11;
|
||||
priority = 0.000000;
|
||||
to="Server_Version_C";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -690,6 +722,7 @@ class FSM
|
||||
class ERROR_Server_not_1
|
||||
{
|
||||
name = "ERROR_Server_not_1";
|
||||
itemno = 37;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = ""Server not Ready (Error 03)"";" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -704,6 +737,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -718,6 +752,7 @@ class FSM
|
||||
class Check_Server_1
|
||||
{
|
||||
name = "Check_Server_1";
|
||||
itemno = 39;
|
||||
init = /*%FSM<STATEINIT""">*/"progressLoadingScreen 0.3;" \n
|
||||
"""Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
@ -726,6 +761,7 @@ class FSM
|
||||
/*%FSM<LINK "Timeout_No_Respo">*/
|
||||
class Timeout_No_Respo
|
||||
{
|
||||
itemno = 40;
|
||||
priority = 0.000000;
|
||||
to="ERROR_Server_not_2";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -736,6 +772,7 @@ class FSM
|
||||
/*%FSM<LINK "Server_Ready">*/
|
||||
class Server_Ready
|
||||
{
|
||||
itemno = 34;
|
||||
priority = 0.000000;
|
||||
to="Check_Server";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -750,6 +787,7 @@ class FSM
|
||||
class ERROR_Server_not_2
|
||||
{
|
||||
name = "ERROR_Server_not_2";
|
||||
itemno = 41;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = ""Server not Ready (Error 02)"";" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -764,6 +802,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -778,6 +817,7 @@ class FSM
|
||||
class Reject_without_B
|
||||
{
|
||||
name = "Reject_without_B";
|
||||
itemno = 43;
|
||||
init = /*%FSM<STATEINIT""">*/"[] spawn {" \n
|
||||
" waitUntil{!isNull (findDisplay 46)};" \n
|
||||
" waitUntil {" \n
|
||||
@ -795,6 +835,7 @@ class FSM
|
||||
class Arma_Version_Che
|
||||
{
|
||||
name = "Arma_Version_Che";
|
||||
itemno = 45;
|
||||
init = /*%FSM<STATEINIT""">*/"progressLoadingScreen 0.15;" \n
|
||||
""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
@ -803,6 +844,7 @@ class FSM
|
||||
/*%FSM<LINK "Outdated_Version">*/
|
||||
class Outdated_Version
|
||||
{
|
||||
itemno = 46;
|
||||
priority = 10.000000;
|
||||
to="ERROR_Wrong_Version_1";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -813,6 +855,7 @@ class FSM
|
||||
/*%FSM<LINK "Player_Object_Re">*/
|
||||
class Player_Object_Re
|
||||
{
|
||||
itemno = 4;
|
||||
priority = 0.000000;
|
||||
to="Check_Player_UID";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/"!isNull player"/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -827,6 +870,7 @@ class FSM
|
||||
class ERROR_Wrong_Version_1
|
||||
{
|
||||
name = "ERROR_Wrong_Version_1";
|
||||
itemno = 47;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = ""You have an outdated version of ArmA 3"";" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -841,6 +885,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -855,6 +900,7 @@ class FSM
|
||||
class Setup_EH_s_and_H
|
||||
{
|
||||
name = "Setup_EH_s_and_H";
|
||||
itemno = 50;
|
||||
init = /*%FSM<STATEINIT""">*/"{" \n
|
||||
" player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n
|
||||
"} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n
|
||||
@ -881,6 +927,7 @@ class FSM
|
||||
/*%FSM<LINK "Has_Current_Weap">*/
|
||||
class Has_Current_Weap
|
||||
{
|
||||
itemno = 53;
|
||||
priority = 10.000000;
|
||||
to="Find_Active_Weap";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -891,6 +938,7 @@ class FSM
|
||||
/*%FSM<LINK "no_weapons">*/
|
||||
class no_weapons
|
||||
{
|
||||
itemno = 51;
|
||||
priority = 0.000000;
|
||||
to="Process";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -905,6 +953,7 @@ class FSM
|
||||
class Process
|
||||
{
|
||||
name = "Process";
|
||||
itemno = 52;
|
||||
init = /*%FSM<STATEINIT""">*/"progressLoadingScreen 0.975;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
@ -912,6 +961,7 @@ class FSM
|
||||
/*%FSM<LINK "Preload_done">*/
|
||||
class Preload_done
|
||||
{
|
||||
itemno = 29;
|
||||
priority = 0.000000;
|
||||
to="FINISH";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -926,6 +976,7 @@ class FSM
|
||||
class Find_Active_Weap
|
||||
{
|
||||
name = "Find_Active_Weap";
|
||||
itemno = 54;
|
||||
init = /*%FSM<STATEINIT""">*/"_activeWeapon = currentWeapon player;" \n
|
||||
"progressLoadingScreen 0.95;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
@ -934,6 +985,7 @@ class FSM
|
||||
/*%FSM<LINK "Current_Weapon_S">*/
|
||||
class Current_Weapon_S
|
||||
{
|
||||
itemno = 56;
|
||||
priority = 0.000000;
|
||||
to="Do_nothing";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -944,6 +996,7 @@ class FSM
|
||||
/*%FSM<LINK "Current_Weapon_Not">*/
|
||||
class Current_Weapon_Not
|
||||
{
|
||||
itemno = 55;
|
||||
priority = 0.000000;
|
||||
to="Select_Weapon";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -958,6 +1011,7 @@ class FSM
|
||||
class Select_Weapon
|
||||
{
|
||||
name = "Select_Weapon";
|
||||
itemno = 57;
|
||||
init = /*%FSM<STATEINIT""">*/"_currentWeapon spawn {" \n
|
||||
" uiSleep 1; " \n
|
||||
" player selectWeapon _this;" \n
|
||||
@ -968,6 +1022,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 58;
|
||||
priority = 0.000000;
|
||||
to="Process";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -982,6 +1037,7 @@ class FSM
|
||||
class Do_nothing
|
||||
{
|
||||
name = "Do_nothing";
|
||||
itemno = 59;
|
||||
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
@ -989,6 +1045,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 58;
|
||||
priority = 0.000000;
|
||||
to="Process";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1003,6 +1060,7 @@ class FSM
|
||||
class Check_New_Player
|
||||
{
|
||||
name = "Check_New_Player";
|
||||
itemno = 60;
|
||||
init = /*%FSM<STATEINIT""">*/"_myTime = diag_tickTime;" \n
|
||||
"" \n
|
||||
"player reveal _playerObject;" \n
|
||||
@ -1019,6 +1077,7 @@ class FSM
|
||||
/*%FSM<LINK "check_new__player">*/
|
||||
class check_new__player
|
||||
{
|
||||
itemno = 61;
|
||||
priority = 0.000000;
|
||||
to="Setup_Player_Obj";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1029,6 +1088,7 @@ class FSM
|
||||
/*%FSM<LINK "Timeout_No_Respo">*/
|
||||
class Timeout_No_Respo
|
||||
{
|
||||
itemno = 15;
|
||||
priority = 0.000000;
|
||||
to="ERROR_Server_not";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1043,6 +1103,7 @@ class FSM
|
||||
class Process_1
|
||||
{
|
||||
name = "Process_1";
|
||||
itemno = 63;
|
||||
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
@ -1050,6 +1111,7 @@ class FSM
|
||||
/*%FSM<LINK "Wait_ArmA_Loading">*/
|
||||
class Wait_ArmA_Loading
|
||||
{
|
||||
itemno = 64;
|
||||
priority = 0.000000;
|
||||
to="Start_Loading_Sc";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1064,6 +1126,7 @@ class FSM
|
||||
class Start_Loading_Sc
|
||||
{
|
||||
name = "Start_Loading_Sc";
|
||||
itemno = 65;
|
||||
init = /*%FSM<STATEINIT""">*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n
|
||||
"if (_debug) then {" \n
|
||||
" diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n
|
||||
@ -1075,6 +1138,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 2;
|
||||
priority = 0.000000;
|
||||
to="Version_Check";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1089,6 +1153,7 @@ class FSM
|
||||
class ERROR_Player_Setup
|
||||
{
|
||||
name = "ERROR_Player_Setup";
|
||||
itemno = 67;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = ""Problem setting up player"";" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -1103,6 +1168,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1117,6 +1183,7 @@ class FSM
|
||||
class Server_Version_C
|
||||
{
|
||||
name = "Server_Version_C";
|
||||
itemno = 69;
|
||||
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
@ -1124,6 +1191,7 @@ class FSM
|
||||
/*%FSM<LINK "Wrong_Server_Ver">*/
|
||||
class Wrong_Server_Ver
|
||||
{
|
||||
itemno = 23;
|
||||
priority = 10.000000;
|
||||
to="ERROR_Wrong_Server";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1134,6 +1202,7 @@ class FSM
|
||||
/*%FSM<LINK "Version_Okay">*/
|
||||
class Version_Okay
|
||||
{
|
||||
itemno = 70;
|
||||
priority = 0.000000;
|
||||
to="Request_Hive";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1148,6 +1217,7 @@ class FSM
|
||||
class ERROR_Server_not_3
|
||||
{
|
||||
name = "ERROR_Server_not_3";
|
||||
itemno = 72;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -1162,6 +1232,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1176,6 +1247,7 @@ class FSM
|
||||
class Process_2
|
||||
{
|
||||
name = "Process_2";
|
||||
itemno = 77;
|
||||
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
@ -1183,6 +1255,7 @@ class FSM
|
||||
/*%FSM<LINK "new_character">*/
|
||||
class new_character
|
||||
{
|
||||
itemno = 74;
|
||||
priority = 10.000000;
|
||||
to="Open_Gender_Selection";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1194,6 +1267,7 @@ class FSM
|
||||
/*%FSM<LINK "load_old_charact">*/
|
||||
class load_old_charact
|
||||
{
|
||||
itemno = 76;
|
||||
priority = 0.000000;
|
||||
to="Process_3";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1208,6 +1282,7 @@ class FSM
|
||||
class Open_Gender_Selection
|
||||
{
|
||||
name = "Open_Gender_Selection";
|
||||
itemno = 78;
|
||||
init = /*%FSM<STATEINIT""">*/"createdialog ""SelectGender"";"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
@ -1215,6 +1290,7 @@ class FSM
|
||||
/*%FSM<LINK "Gender_Selected">*/
|
||||
class Gender_Selected
|
||||
{
|
||||
itemno = 80;
|
||||
priority = 10.000000;
|
||||
to="Send_character_s";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1225,6 +1301,7 @@ class FSM
|
||||
/*%FSM<LINK "Timeout">*/
|
||||
class Timeout
|
||||
{
|
||||
itemno = 81;
|
||||
priority = 0.000000;
|
||||
to="Send_character_s";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1236,6 +1313,7 @@ class FSM
|
||||
/*%FSM<LINK "Reopen_when_client">*/
|
||||
class Reopen_when_client
|
||||
{
|
||||
itemno = 79;
|
||||
priority = 0.000000;
|
||||
to="Open_Gender_Selection";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1250,6 +1328,7 @@ class FSM
|
||||
class Send_character_s
|
||||
{
|
||||
name = "Send_character_s";
|
||||
itemno = 82;
|
||||
init = /*%FSM<STATEINIT""">*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n
|
||||
"""Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n
|
||||
"" \n
|
||||
@ -1261,6 +1340,7 @@ class FSM
|
||||
/*%FSM<LINK "load_old_charact">*/
|
||||
class load_old_charact
|
||||
{
|
||||
itemno = 76;
|
||||
priority = 0.000000;
|
||||
to="Process_3";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1275,6 +1355,7 @@ class FSM
|
||||
class Process_3
|
||||
{
|
||||
name = "Process_3";
|
||||
itemno = 83;
|
||||
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
@ -1282,6 +1363,7 @@ class FSM
|
||||
/*%FSM<LINK "Timeout_No_Respo">*/
|
||||
class Timeout_No_Respo
|
||||
{
|
||||
itemno = 22;
|
||||
priority = 0.000000;
|
||||
to="ERROR_Server_not_4";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1292,6 +1374,7 @@ class FSM
|
||||
/*%FSM<LINK "Response">*/
|
||||
class Response
|
||||
{
|
||||
itemno = 16;
|
||||
priority = 0.000000;
|
||||
to="Check_New_Player";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
@ -1318,6 +1401,7 @@ class FSM
|
||||
class ERROR_Server_not_4
|
||||
{
|
||||
name = "ERROR_Server_not_4";
|
||||
itemno = 84;
|
||||
init = /*%FSM<STATEINIT""">*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n
|
||||
"_msg call Epoch_updateLoadingScreen;" \n
|
||||
"diag_log _msg;" \n
|
||||
@ -1332,6 +1416,7 @@ class FSM
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
itemno = 32;
|
||||
priority = 0.000000;
|
||||
to="Display_Message";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
Author: Raimonds Virtoss - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Creates special dialog that allows players to reposition (move) all HUD groups on the screen and save to profile
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/dynamicHUD/Epoch_dynamicHUD_adjust.sqf
|
||||
*/
|
||||
_this spawn {
|
||||
disableSerialization;
|
||||
(findDisplay 49) closeDisplay 0;
|
||||
|
||||
waitUntil {isNull (findDisplay 49)};
|
||||
|
||||
if (_this) then {
|
||||
findDisplay 46 createDisplay "rmx_moveDynamicHUD";
|
||||
_dsp = findDisplay 66666;
|
||||
rmx_var_dynamicHUD_groupsAdjust = [];
|
||||
rmx_var_drag_MouseDown = false;
|
||||
{
|
||||
_c = _dsp ctrlCreate ["rmx_drag_RscActivePicture", call epoch_getIDC];
|
||||
_c ctrlSetText "#(rgb,8,8,3)color(1,1,1,1)";
|
||||
_c ctrlSetPosition (ctrlPosition _x);
|
||||
_c ctrlCommit 0;
|
||||
rmx_var_dynamicHUD_groupsAdjust set [_forEachIndex, _c];
|
||||
} forEach rmx_var_dynamicHUD_groups;
|
||||
|
||||
waitUntil {!isNull (findDisplay 66666)};
|
||||
while {!isNull (findDisplay 66666)} do {
|
||||
if !(rmx_var_drag_MouseDown) then {
|
||||
{
|
||||
_c = (rmx_var_dynamicHUD_groups select _forEachIndex);
|
||||
_c ctrlSetPosition (ctrlPosition _x);
|
||||
_c ctrlCommit 0;
|
||||
} forEach rmx_var_dynamicHUD_groupsAdjust;
|
||||
};
|
||||
uiSleep 0.1;
|
||||
};
|
||||
} else {
|
||||
//reset hud positions
|
||||
};
|
||||
};
|
||||
|
||||
true
|
@ -0,0 +1,13 @@
|
||||
/*
|
||||
Author: Raimonds Virtoss - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/dynamicHUD/Epoch_loadSave.sqf
|
||||
*/
|
@ -0,0 +1,126 @@
|
||||
/*
|
||||
Author: Raimonds Virtoss - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Creates special HUD Groups defined in CfgDynamicHUD.hpp at the start of the game.
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/dynamicHUD/Epoch_dynamicHUD_start.sqf
|
||||
*/
|
||||
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||
|
||||
_cfg = "rmx_dynamicHUD" call EPOCH_returnConfig;
|
||||
_configs = "true" configClasses _cfg;
|
||||
|
||||
setMousePosition [0.5,0.5];
|
||||
|
||||
disableSerialization;
|
||||
_dsp = findDisplay 46;
|
||||
|
||||
rmx_var_dynamicHUD_groups = [];
|
||||
rmx_var_dynamicHUD_groupCTRL = [];
|
||||
|
||||
{
|
||||
_group = _dsp ctrlCreate ["rscControlsGroup", call Epoch_getIDC];
|
||||
rmx_var_dynamicHUD_groups set [_forEachIndex, _group];
|
||||
|
||||
_defaultPopulate = getNumber (_x >> "defaultPopulate");
|
||||
_defaultPos = getNumber (_x >> "defaultPos");
|
||||
_arraySize = getNumber (_x >> "arraySize");
|
||||
_classname = getText (_x >> "classname");
|
||||
_offsetX = getNumber (_x >> "offSetX");
|
||||
_offsetY = getNumber (_x >> "offSetY");
|
||||
_height = getNumber (_x >> "height");
|
||||
_width = getNumber (_x >> "width");
|
||||
|
||||
_wCtrl = _width * GUI_GRID_W;
|
||||
_hCtrl = _height * GUI_GRID_H;
|
||||
_oX = _offsetX * _wCtrl;
|
||||
_oY = _offsetY * _hCtrl;
|
||||
|
||||
_w = 0; _h = 0;
|
||||
if (_defaultPopulate in [0,1,4]) then {
|
||||
_w = _arraySize * _width * GUI_GRID_W;
|
||||
_h = _height * GUI_GRID_H;
|
||||
} else {
|
||||
_w = _width * GUI_GRID_W;
|
||||
_h = _arraySize * _height * GUI_GRID_H;
|
||||
};
|
||||
|
||||
_groupPos = switch _defaultPos do {
|
||||
case 0: {[SafezoneX, safezoneY, _w, _h]};
|
||||
case 1: {[0.5 - _w/2, safezoneY, _w, _h]};
|
||||
case 2: {[(safezoneW + safezoneX) - _w, safezoneY, _w, _h]};
|
||||
case 3: {[SafezoneX, 0.5 - _h/2, _w, _h]};
|
||||
case 4: {[0.5 - _w/2, 0.5 - _h/2, _w, _h]};
|
||||
case 5: {[(safezoneW + safezoneX) - _w, 0.5 - _h/2, _w, _h]};
|
||||
case 6: {[SafezoneX, (safezoneH + safezoneY) - _h, _w, _h]};
|
||||
case 7: {[0.5 - _w/2, (safezoneH + safezoneY) - _h, _w, _h]};
|
||||
case 8: {[(safezoneW + safezoneX) - _w, (safezoneH + safezoneY) - _h, _w, _h]};
|
||||
default {[0,0,0,0]};
|
||||
};
|
||||
|
||||
_groupPos set [0, (_groupPos select 0)+_oX];
|
||||
_groupPos set [1, (_groupPos select 1)+_oY];
|
||||
_group ctrlSetPosition _groupPos;
|
||||
_group ctrlCommit 0;
|
||||
|
||||
_evenOdd = true;
|
||||
rmx_var_dynamicHUD_groupCTRL set [_forEachIndex, [(configName _x)]];
|
||||
|
||||
for "_i" from 0 to (_arraySize - 1) do {
|
||||
_c = _dsp ctrlCreate [_classname, call Epoch_getIDC, _group];
|
||||
(rmx_var_dynamicHUD_groupCTRL select _forEachIndex) pushBack _c;
|
||||
|
||||
_cPos = switch _defaultPopulate do {
|
||||
case 0: {[_i * _wCtrl,0,_wCtrl, _hCtrl]};
|
||||
case 1: {[(_arraySize - 1 - _i) * _wCtrl,0,_wCtrl, _hCtrl]};
|
||||
case 2: {[0,_i * _hCtrl,_wCtrl, _hCtrl]};
|
||||
case 3: {[0,(_arraySize - 1 - _i) * _hCtrl,_wCtrl, _hCtrl]};
|
||||
case 4:
|
||||
{
|
||||
_center = _w/2 - _wCtrl/2;
|
||||
|
||||
_result = if (_i == 0) then {
|
||||
[_center, 0, _wCtrl, _hCtrl]
|
||||
} else {
|
||||
if _evenOdd then {
|
||||
[_wCtrl * _i/2 + _center, 0, _wCtrl, _hCtrl]
|
||||
} else {
|
||||
[(_center - _wCtrl/2) - (_wCtrl * _i/2), 0, _wCtrl, _hCtrl]
|
||||
};
|
||||
};
|
||||
_evenOdd = !_evenOdd;
|
||||
_result
|
||||
};
|
||||
case 5:
|
||||
{
|
||||
_center = _h/2 - _hCtrl/2;
|
||||
|
||||
_result = if (_i == 0) then {
|
||||
[0, _center, _wCtrl, _hCtrl]
|
||||
} else {
|
||||
if _evenOdd then {
|
||||
[0, _hCtrl * _i/2 + _center, _wCtrl, _hCtrl]
|
||||
} else {
|
||||
[0, (_center - _hCtrl/2) - (_hCtrl * _i/2), _wCtrl, _hCtrl]
|
||||
};
|
||||
};
|
||||
_evenOdd = !_evenOdd;
|
||||
_result
|
||||
};
|
||||
default {[0,0,0,0]};
|
||||
};
|
||||
_c ctrlSetPosition _cPos;
|
||||
_c ctrlCommit 0;
|
||||
};
|
||||
} forEach _configs;
|
||||
|
||||
//dump default positions into an array
|
||||
|
||||
true
|
@ -0,0 +1,32 @@
|
||||
/*
|
||||
Author: Raimonds Virtoss - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Returns Control from Dynamic HUD to be manipulated externally. See CfgDynamicHUD.hpp on how to create your own HUD groups.
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/dynamicHUD/Epoch_getHUDCtrl.sqf
|
||||
|
||||
Usage:
|
||||
[_configName, _index] call epoch_getHUDCtrl;
|
||||
["myHudName", 2] call epoch_getHUDCtrl;
|
||||
*/
|
||||
|
||||
if !(_this isEqualTypeArray ["",0]) exitWith {controlNull};
|
||||
|
||||
params ["_gName","_cIdx"];
|
||||
|
||||
_gIdx = -1;
|
||||
|
||||
{
|
||||
if ((_x select 0) isEqualTo _gName) exitWith {_gIdx = _forEachIndex};
|
||||
} forEach rmx_var_dynamicHUD_groupCTRL;
|
||||
|
||||
if (_gIdx == -1) exitWith {controlNull};
|
||||
|
||||
(rmx_var_dynamicHUD_groupCTRL select _gIdx) select _cIdx
|
26
Sources/epoch_code/gui/scripts/epoch_dragControl.sqf
Normal file
26
Sources/epoch_code/gui/scripts/epoch_dragControl.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Author: Raimonds Virtoss - EpochMod.com
|
||||
|
||||
Contributors:
|
||||
|
||||
Description:
|
||||
Gives ability to move active controls like RscActivePicture (see Epoch_GUI_rmx.hpp for an example).
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/Epoch_dragControl.sqf
|
||||
|
||||
Usage:
|
||||
No direct usage, simply create your control in configs following example in HPP mentioned in description
|
||||
*/
|
||||
private ["_ctrl","_curr","_mpos"];
|
||||
_ctrl = param [0];
|
||||
_curr = ctrlPosition _Ctrl;
|
||||
_mpos = getmousePosition;
|
||||
|
||||
if (rmx_var_drag_MouseDown) then {
|
||||
_ctrl ctrlSetPosition [(_mpos select 0) - (_curr select 2) / 2, (_mpos select 1) - (_curr select 3) / 2 ];
|
||||
_ctrl ctrlCommit 0;
|
||||
};
|
@ -55,6 +55,7 @@ EPOCH_arr_interactedObjs = [];
|
||||
EPOCH_buildOption = 0;
|
||||
EPOCH_nearestLocations = [];
|
||||
EPOCH_lastFiredLocation = [];
|
||||
rmx_var_drag_MouseDown = false;
|
||||
|
||||
["EPOCH_onEachFrame", "onEachFrame", EPOCH_onEachFrame] call BIS_fnc_addStackedEventHandler;
|
||||
|
||||
|
@ -178,6 +178,7 @@ class CfgClientFunctions
|
||||
class secureStorageHandler {};
|
||||
class genderSelection {};
|
||||
class getColorScheme {};
|
||||
class dragControl {};
|
||||
};
|
||||
|
||||
class config {
|
||||
@ -192,6 +193,14 @@ class CfgClientFunctions
|
||||
class dynamicMenuCleanup {};
|
||||
};
|
||||
|
||||
class dynamicHUD {
|
||||
file = "epoch_code\gui\scripts\dynamicHUD";
|
||||
class dynamicHUD_adjust {};
|
||||
class dynamicHUD_loadSave {};
|
||||
class dynamicHUD_start {};
|
||||
class getHUDCtrl {};
|
||||
};
|
||||
|
||||
class gui_craft {
|
||||
file = "epoch_code\gui\scripts\craftingv2";
|
||||
class crafting_animate {};
|
||||
|
60
Sources/epoch_config/Configs/CfgDynamicHUD.hpp
Normal file
60
Sources/epoch_config/Configs/CfgDynamicHUD.hpp
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
defaultPos:
|
||||
0 - top left
|
||||
1 - top center
|
||||
2 - top right
|
||||
3 - mid left
|
||||
4 - mid center
|
||||
5 - mid right
|
||||
6 - bottom left
|
||||
7 - bottom center
|
||||
8 - bottom right
|
||||
|
||||
defaultPopulate:
|
||||
0 - right
|
||||
1 - left
|
||||
2 - down
|
||||
3 - up
|
||||
4 - horizontal grow
|
||||
5 - vertical grow
|
||||
|
||||
offSetX: Positive = right, Negative = left
|
||||
offSetY: Positive = down, Negative = up
|
||||
Offsets group of controls, unit measurement is width or height of group. The bigger the group the more it will be offset.
|
||||
Offsets are optional, don't have to be included
|
||||
|
||||
classname:
|
||||
https://community.bistudio.com/wiki/ctrlCreate/classnames
|
||||
|
||||
Obtaining Controls:
|
||||
use epoch_getHUDCtrl function to obtain controls for manipulation
|
||||
_name = Config name of your group
|
||||
_index = each group hosts multiple elements, each element has it's index, starting from 0
|
||||
[_ConfigName, _index] call epoch_getHUDCtrl;
|
||||
["myHUDname", 3] call epoch_getHUDCtrl;
|
||||
*/
|
||||
|
||||
class rmx_dynamicHUD
|
||||
{
|
||||
class topRight //ConfigName matters to be able to use function!
|
||||
{
|
||||
classname = "RscPicture";
|
||||
defaultPos = 2;
|
||||
defaultPopulate = 1;
|
||||
arraySize = 8;
|
||||
width = 4;
|
||||
height = 4;
|
||||
offSetX = 0;
|
||||
offSetY = 0;
|
||||
};
|
||||
class botcenter
|
||||
{
|
||||
classname = "RscPicture";
|
||||
defaultPos = 7;
|
||||
defaultPopulate = 4;
|
||||
arraySize = 9;
|
||||
width = 5;
|
||||
height = 5;
|
||||
};
|
||||
|
||||
};
|
@ -23,6 +23,13 @@ class CfgEpochConfiguration
|
||||
icon = "\x\addons\a3_epoch_code\Data\owner.paa";
|
||||
controlGroup = "EpochConfigKeyMap";
|
||||
};
|
||||
class HUD
|
||||
{
|
||||
name = "Customize HUD (WIP)";
|
||||
color[] = {1,1,1,1};
|
||||
icon = "\x\addons\a3_epoch_code\Data\owner.paa";
|
||||
controlGroup = "Epoch_main_config_dynamicHUD";
|
||||
};
|
||||
class html
|
||||
{
|
||||
name = "Changelog";
|
||||
|
@ -57,6 +57,7 @@ disableRandomization[] = {"All"};
|
||||
#include "Configs\CfgMissionsTasks.hpp"
|
||||
#include "Configs\cfgCrafting.hpp"
|
||||
#include "Configs\cfgPricing.hpp"
|
||||
#include "Configs\CfgDynamicHUD.hpp"
|
||||
|
||||
#include "Configs\CfgEpochClient.hpp"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user