Commit 7fab6c9a authored by Soldia1138's avatar Soldia1138
Browse files

Added GameInit Function

parent 72fee31f
class CfgFunctions
{
class SOL
{
class w_buttons
{
// SOL_fnc_Wbuttons_initOnGameStart
file = "\sol\clearhud\addons\w_butons\Wbuttons_initOnGameStart.sqf";
preStart = 1;
};
};
};
\ No newline at end of file
......@@ -4,7 +4,7 @@ class RscButtonMenu;
class RscStandardDisplay;
class RscDisplayMain: RscStandardDisplay
{
onLoad = "[""onLoad"",_this,""RscDisplayMain"",'GUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay');";
//onLoad = "[""onLoad"",_this,""RscDisplayMain"",'GUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay');";
//onLoad = QUOTE([ARR_4('onLoad',_this,'RscDisplayMain','GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'););
......@@ -28,7 +28,7 @@ class RscDisplayMain: RscStandardDisplay
{
idc = 11380;
default = 0;
onbuttonclick = QUOTE(_this execVM QUOTE(QUOTE(PATHTOF(script_loadWButtons.sqf))));
onbuttonclick = QUOTE(_this execVM QUOTE(QUOTE(PATHTOF(script_handleWButtons.sqf))));
text = "Baugrube";
x = "25 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX)";
......@@ -43,7 +43,7 @@ class RscDisplayMain: RscStandardDisplay
{
idc = 11381;
default = 0;
onbuttonclick = QUOTE(_this execVM QUOTE(QUOTE(PATHTOF(script_loadWButtons.sqf))));
onbuttonclick = QUOTE(_this execVM QUOTE(QUOTE(PATHTOF(script_handleWButtons.sqf))));
text = "Server #1";
x = "25 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX)";
......@@ -58,7 +58,7 @@ class RscDisplayMain: RscStandardDisplay
{
idc = 11382;
default = 0;
onbuttonclick = QUOTE(_this execVM QUOTE(QUOTE(PATHTOF(script_loadWButtons.sqf))));
onbuttonclick = QUOTE(_this execVM QUOTE(QUOTE(PATHTOF(script_handleWButtons.sqf))));
text = "Server #2";
x = "25 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX)";
......@@ -73,7 +73,7 @@ class RscDisplayMain: RscStandardDisplay
{
idc = 11383;
default = 0;
onbuttonclick = QUOTE(_this execVM QUOTE(QUOTE(PATHTOF(script_loadWButtons.sqf))));
onbuttonclick = QUOTE(_this execVM QUOTE(QUOTE(PATHTOF(script_handleWButtons.sqf))));
text = "Testserver";
x = "25 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX)";
......@@ -84,6 +84,4 @@ class RscDisplayMain: RscStandardDisplay
colorBackground[] = {0,0,0.1,0.8};
};
};
};
//_this execVM QUOTE(QUOTE(PATHTOF(script_loadWButtons.sqf)));
\ No newline at end of file
};
\ No newline at end of file
/*
* Author: Soldia
* Configures all W Buttons
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* --
*
* Public: No
*/
disableSerialization;
#define CONTROL(display,ctrl) ((findDisplay display) displayCtrl ctrl)
// Wait until Main Display is initialized
waitUntil {!(isNull (findDisplay 0))};
/*
* Author: Soldia
* Configures all W Buttons
* Handles Presses for Server-Buttons
*
* Arguments:
* 0: Display (from onLoad) <DISPLAY>
......@@ -81,7 +81,7 @@ _serverfound = false;
waitUntil {
//If we waited for more than 10 seconds, quit
if(diag_tickTime > (_starttime + 10000)) exitWith {
_serverfound = false;
_serverfound = false
};
if(lbSize (CONTROL(8,102)) > 1) then {
_serverfound = true;
......@@ -95,7 +95,7 @@ if(_serverfound) then {
uiSleep 0.1;
if((ctrlText (CONTROL(8,129)) find "W") < 1) then {
if((ctrlText (CONTROL(8,129)) find "W") < 10) then {
if(ctrlEnabled CONTROL(8,105)) then {
ctrlActivate CONTROL(8,105);
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment