• 0
[ReSpec] Hunter

How Do We Add Apps To The "More" Tab In XM8?

Question

Posted (edited)

feels.thumb.png.b119d5c118843b9f35e638c4

Hey guys!

    Another day, another server coding error that you hate; anyways! I need some help finding out how to add the apps to the "More" tab for the XM8 a little more in-depth. I've searched the forums and seen a few posts on how to do this; but its all very complex. So I would like to create a base here that is more simple from the people who have found it out if any so far =) So if you found an easy way to add those darn apps to that More section, please, let me know below!

Thank you much,

Hunter

Edited by [ReSpec] Hunter
1 person likes this

Share this post


Link to post
Share on other sites

6 answers to this question

  • 0

@Janski care to share? I wasnt able to quite figure it out but i have been studying what you have released in your pack. Even then i dont fully get what you have done as i never really looked into something like this. I too would like to know :P

1 person likes this

Share this post


Link to post
Share on other sites
  • 0
6 minutes ago, Metalman10 said:

@Janski care to share? I wasnt able to quite figure it out but i have been studying what you have released in your pack. Even then i dont fully get what you have done as i never really looked into something like this. I too would like to know :P

I second this statement, I saw the post by @Janski but I wasn't able to figure out how to specifically piece it all together with my server not wanting to boot up at all =) Alas! Best to always ask the community as it is a collective of information so together we ought to be able to find a specific way to add outside apps to the more tab.

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement
  • 0

Posted (edited)

Hi,

So what I've done is pretty simple, we can divide it into 4 different stages

  • Execute code upon connection
  • Overwriting Exile functions 
  • Add CfgXM8 in the missionConfigFile 
  • Create Apps

*I'll comment the code

 - First I prepare the App related functions and variables with automatic function that is executed upon client connect.

Spoiler

/*Read the configuration file*/
_path = "ExAdClient\XM8\customize.sqf";
call compile preprocessFileLineNumbers _path;

/*For each wanted app, prepare functions and app related configuration*/
{
	/*Check if onOpen function is provided and if so, prepare compile and read it to memory*/
	if(isText(missionConfigFile >> "CfgXM8" >> _x >> "onOpen"))then{
		_code = compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onOpen"));                    
		missionNamespace setVariable [format["ExileClient_gui_xm8_slide_%1_onOpen",_x], _code];
	};
	
	/*Check if onClose function is provided and if so, prepare compile and read it to memory*/
	if(isText(missionConfigFile >> "CfgXM8" >> _x >> "onClose"))then{
		_code = compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onClose"));                    
		missionNamespace setVariable [format["ExileClient_gui_xm8_slide_%1_onClose",_x], _code];
	};
	
	/*Check if a configuration file is provided. If so, prepare compile and read it to memory*/
	if(isText(missionConfigFile >> "CfgXM8" >> _x >> "config"))then{
		call compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "config"));
	};
}forEach (getArray(missionConfigFile >> "CfgXM8" >> "extraApps"));

 

 - Then I overwrite 2 Exile functions 

  • "ExileClient_gui_xm8_show.sqf"
    Spoiler
    
    //Part of ExileClient_gui_xm8_show function 
    
    
    //Add configured controls and add them to "More"
    call ExAd_fnc_createExtraApps;
    call ExAd_fnc_addApps;
    {
    	_slideControlID = getNumber (_x >> "controlID");
    	_slideName = configName _x;
    	_slideTitle = getText (_x >> "title");
    	_slideControl = _display displayCtrl _slideControlID;
    	if (_slideName isEqualTo ExileClientXM8CurrentSlide) then
    	{
    		_titleControl = _display displayCtrl 4004;
    		_titleControl ctrlSetStructuredText (parseText (format ["<t align='center' font='RobotoMedium'>%1</t>", _slideTitle]));
    		_slideControl ctrlSetPosition [(0 * 0.05), (0 * 0.05)];
    		_slideControl ctrlCommit 0;
    		_slideControl ctrlShow true;
    		_toSlideOpenFunction = missionNamespace getVariable [format ["ExileClient_gui_xm8_slide_%1_onOpen", _slideName], ""];
    		if !(_toSlideOpenFunction isEqualTo "") then
    		{
    			call _toSlideOpenFunction;
    		};
    	}
    	else 
    	{
    		_slideControl ctrlShow false;
    	};
    }
    /*("true" configClasses (missionConfigFile >> "CfgXM8")) will allow the new classes from the missionConfigFile to also be prepared for the XM8*/
    forEach (("true" configClasses (configFile >> "CfgXM8")) + ("true" configClasses (missionConfigFile >> "CfgXM8")));
    

     


    Added 2 functions
    • Add all new extra controllers to the XM8 dialog and hide them
      Spoiler
      
      private["_apps","_display"];
      
      _apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps");
      _display = uiNameSpace getVariable ["RscExileXM8", displayNull];
      
      {
      	call compile format["ExAd_XM8_MAP_%1 = [];",_x];
      	
      	if(isClass(missionConfigFile >> "CfgXM8" >> _x))then{
      		_idc = getNumber(missionConfigFile >> "CfgXM8" >> _x >> "controlID");
      		_slide = _display ctrlCreate ["RscExileXM8Slide",_idc, _display displayCtrl 4007];
      		[_display, _slide, _idc]call compile preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onLoad");
      		_slide ctrlShow false;
      	}	
      }forEach _apps;
      
      true

       

       

    • Add the title and an eventHandler to each new more apps button 
      Spoiler
      
      private["_apps","_count","_title","_display"];
      
      _apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps");
      if(count _apps == 0)exitWith{false};
      
      _count = 10;
      _count2 = 5000;
      _title = "ExAd";
      
      /*Find where to begin adding new apps in the button grid*/
      while {_title != ""} do 
      {
      	_count = _count + 1;
      	_count2 = _count2 + 1;
      	_count = if(_count > 15)then{
      		if(_count > 25)then{
      			if(_count < 31)then{31}else{_count}
      		}else{
      			if(_count < 21)then{21}else{_count}
      		}
      	}else{
      		_count
      	};
      	_title = getText(configFile >> "RscExileXM8" >> "Controls" >> "Slides" >> "Controls" >>"SlideExtraApps" >> "Controls" >> format["App%1", _count] >> "text");
      };
      
      _display = uiNameSpace getVariable ["RscExileXM8", displayNull];
      
      /*Add title and click eventHandler for the new app*/
      {
      	private["_ctrl"];
      	_ctrl = (_display displayCtrl _count2);
      	_ctrl ctrlSetText getText(missionConfigFile >> "CfgXM8" >> _x >> "title");
      	_ctrl ctrlSetEventHandler ["ButtonClick", format["['%1', 0] call ExileClient_gui_xm8_slide",_x]];
      	
      	_count2 = _count2 + 1;
      }forEach _apps;
      
      true

       

       

  • ExileClient_gui_xm8_slide.sqf
    Just added the possibility for the script to check the missionConfigFile if it couldn't find the right instructions in the configFile.
    Spoiler
    
    //Manipulate the source of config data
    _src = if(isClass(configFile >> "CfgXM8" >> _toSlideName))then{configFile}else{missionConfigFile};
    _toSlideControlID = getNumber (_src >> "CfgXM8" >> _toSlideName >> "controlID");

     

     

 - Add CfgXM8 in the missionConfigFile 

This class will allow you to add new app instructions for the engine to find and use. The class also implements some new properties to add extra functionality to my script. 

Spoiler

class CfgXM8
{
	extraApps[] = {"ExAd_VG","ExAd_Info"};
	
	class ExAd_VG 
	{
		title = "Virtual Garage";
		controlID = 50000;					//IDC:50000 -> 50014 || These need to be unique
		onLoad = "ExAdClient\XM8\Apps\VG\onLoad.sqf";
		onOpen = "ExAdClient\XM8\Apps\VG\onOpen.sqf";
		onClose = "ExAdClient\XM8\Apps\VG\onClose.sqf";
	};	
	class ExAd_Info 
	{
		title = "Server Info";
		controlID = 50100;					//IDC:50100 -> 50101 || These need to be unique
		onLoad = "ExAdClient\XM8\Apps\Info\onLoad.sqf";
		onOpen = "ExAdClient\XM8\Apps\Info\onOpen.sqf";
		onClose = "ExAdClient\XM8\Apps\Info\onClose.sqf";
	};
};

 

 - Create Apps

You create and app in 4 steps 

  1. Create onLoad instruction so the engine will know what controllers to create to the XM8 dialog 
  2. Create onOpen and onClose, if necessary, to give instruction on what should happen when the slide is activated/deactivated
  3. Add the new app class to the CfgXM8 class  and instruct the script where it can find proper code to prepare 
  4. Add the new app class to the extraApps array  in the CfgXM8 class so the engine will know that it should prepare the app for the XM8 

 

Edited by Janski
Clarify
3 people like this

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

12 hours ago, Janski said:

Hi,

So what I've done is pretty simple, we can divide it into 4 different stages

  • Execute code upon connection
  • Overwriting Exile functions 
  • Add CfgXM8 in the missionConfigFile 
  • Create Apps

*I'll comment the code

 - First I prepare the App related functions and variables with automatic function that is executed upon client connect.

  Reveal hidden contents


/*Read the configuration file*/
_path = "ExAdClient\XM8\customize.sqf";
call compile preprocessFileLineNumbers _path;

/*For each wanted app, prepare functions and app related configuration*/
{
	/*Check if onOpen function is provided and if so, prepare compile and read it to memory*/
	if(isText(missionConfigFile >> "CfgXM8" >> _x >> "onOpen"))then{
		_code = compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onOpen"));                    
		missionNamespace setVariable [format["ExileClient_gui_xm8_slide_%1_onOpen",_x], _code];
	};
	
	/*Check if onClose function is provided and if so, prepare compile and read it to memory*/
	if(isText(missionConfigFile >> "CfgXM8" >> _x >> "onClose"))then{
		_code = compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onClose"));                    
		missionNamespace setVariable [format["ExileClient_gui_xm8_slide_%1_onClose",_x], _code];
	};
	
	/*Check if a configuration file is provided. If so, prepare compile and read it to memory*/
	if(isText(missionConfigFile >> "CfgXM8" >> _x >> "config"))then{
		call compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "config"));
	};
}forEach (getArray(missionConfigFile >> "CfgXM8" >> "extraApps"));

 

 - Then I overwrite 2 Exile functions 

  • "ExileClient_gui_xm8_show.sqf"
      Reveal hidden contents
    
    
    //Part of ExileClient_gui_xm8_show function 
    
    
    //Add configured controls and add them to "More"
    call ExAd_fnc_createExtraApps;
    call ExAd_fnc_addApps;
    {
    	_slideControlID = getNumber (_x >> "controlID");
    	_slideName = configName _x;
    	_slideTitle = getText (_x >> "title");
    	_slideControl = _display displayCtrl _slideControlID;
    	if (_slideName isEqualTo ExileClientXM8CurrentSlide) then
    	{
    		_titleControl = _display displayCtrl 4004;
    		_titleControl ctrlSetStructuredText (parseText (format ["<t align='center' font='RobotoMedium'>%1</t>", _slideTitle]));
    		_slideControl ctrlSetPosition [(0 * 0.05), (0 * 0.05)];
    		_slideControl ctrlCommit 0;
    		_slideControl ctrlShow true;
    		_toSlideOpenFunction = missionNamespace getVariable [format ["ExileClient_gui_xm8_slide_%1_onOpen", _slideName], ""];
    		if !(_toSlideOpenFunction isEqualTo "") then
    		{
    			call _toSlideOpenFunction;
    		};
    	}
    	else 
    	{
    		_slideControl ctrlShow false;
    	};
    }
    /*("true" configClasses (missionConfigFile >> "CfgXM8")) will allow the new classes from the missionConfigFile to also be prepared for the XM8*/
    forEach (("true" configClasses (configFile >> "CfgXM8")) + ("true" configClasses (missionConfigFile >> "CfgXM8")));
    

     


    Added 2 functions
    • Add all new extra controllers to the XM8 dialog and hide them
        Reveal hidden contents
      
      
      private["_apps","_display"];
      
      _apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps");
      _display = uiNameSpace getVariable ["RscExileXM8", displayNull];
      
      {
      	call compile format["ExAd_XM8_MAP_%1 = [];",_x];
      	
      	if(isClass(missionConfigFile >> "CfgXM8" >> _x))then{
      		_idc = getNumber(missionConfigFile >> "CfgXM8" >> _x >> "controlID");
      		_slide = _display ctrlCreate ["RscExileXM8Slide",_idc, _display displayCtrl 4007];
      		[_display, _slide, _idc]call compile preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onLoad");
      		_slide ctrlShow false;
      	}	
      }forEach _apps;
      
      true

       

       

    • Add the title and an eventHandler to each new more apps button 
        Reveal hidden contents
      
      
      private["_apps","_count","_title","_display"];
      
      _apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps");
      if(count _apps == 0)exitWith{false};
      
      _count = 10;
      _count2 = 5000;
      _title = "ExAd";
      
      /*Find where to begin adding new apps in the button grid*/
      while {_title != ""} do 
      {
      	_count = _count + 1;
      	_count2 = _count2 + 1;
      	_count = if(_count > 15)then{
      		if(_count > 25)then{
      			if(_count < 31)then{31}else{_count}
      		}else{
      			if(_count < 21)then{21}else{_count}
      		}
      	}else{
      		_count
      	};
      	_title = getText(configFile >> "RscExileXM8" >> "Controls" >> "Slides" >> "Controls" >>"SlideExtraApps" >> "Controls" >> format["App%1", _count] >> "text");
      };
      
      _display = uiNameSpace getVariable ["RscExileXM8", displayNull];
      
      /*Add title and click eventHandler for the new app*/
      {
      	private["_ctrl"];
      	_ctrl = (_display displayCtrl _count2);
      	_ctrl ctrlSetText getText(missionConfigFile >> "CfgXM8" >> _x >> "title");
      	_ctrl ctrlSetEventHandler ["ButtonClick", format["['%1', 0] call ExileClient_gui_xm8_slide",_x]];
      	
      	_count2 = _count2 + 1;
      }forEach _apps;
      
      true

       

       

  • ExileClient_gui_xm8_slide.sqf
    Just added the possibility for the script to check the missionConfigFile if it couldn't find the right instructions in the configFile.
      Reveal hidden contents
    
    
    //Manipulate the source of config data
    _src = if(isClass(configFile >> "CfgXM8" >> _toSlideName))then{configFile}else{missionConfigFile};
    _toSlideControlID = getNumber (_src >> "CfgXM8" >> _toSlideName >> "controlID");

     

     

 - Add CfgXM8 in the missionConfigFile 

This class will allow you to add new app instructions for the engine to find and use. The class also implements some new properties to add extra functionality to my script. 

  Reveal hidden contents


class CfgXM8
{
	extraApps[] = {"ExAd_VG","ExAd_Info"};
	
	class ExAd_VG 
	{
		title = "Virtual Garage";
		controlID = 50000;					//IDC:50000 -> 50014 || These need to be unique
		onLoad = "ExAdClient\XM8\Apps\VG\onLoad.sqf";
		onOpen = "ExAdClient\XM8\Apps\VG\onOpen.sqf";
		onClose = "ExAdClient\XM8\Apps\VG\onClose.sqf";
	};	
	class ExAd_Info 
	{
		title = "Server Info";
		controlID = 50100;					//IDC:50100 -> 50101 || These need to be unique
		onLoad = "ExAdClient\XM8\Apps\Info\onLoad.sqf";
		onOpen = "ExAdClient\XM8\Apps\Info\onOpen.sqf";
		onClose = "ExAdClient\XM8\Apps\Info\onClose.sqf";
	};
};

 

 - Create Apps

You create and app in 4 steps 

  1. Create onLoad instruction so the engine will know what controllers to create to the XM8 dialog 
  2. Create onOpen and onClose, if necessary, to give instruction on what should happen when the slide is activated/deactivated
  3. Add the new app class to the CfgXM8 class  and instruct the script where it can find proper code to prepare 
  4. Add the new app class to the extraApps array  in the CfgXM8 class so the engine will know that it should prepare the app for the XM8 

 

Thank you for the very thorough explanation =) Okay, so basically; I would follow the normal setup for the application as it is described to be in docs for the XM8, then afterwards, just create an onLoad instruction and onOpen and onClose function so that it runs for that specific app in that specific slot, and then I just add into at the bottom of config.cpp and connect the class to what has been defined in one of those onLoad files inside of Apps\(Appname)\onLoad?

 

Better question: How do I edit those onLoad, onOpen, and onClose to work with a mod such as if I used a script for Advanced Server Info? Is there something specifically I just drag over from that code to run into the onLoad and then onOpen and onClose just leave it mostly as it is with minor changes to what it says to you?

Edited by [ReSpec] Hunter
Confusion

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, [ReSpec] Hunter said:

Thank you for the very thorough explanation =) Okay, so basically; I would follow the normal setup for the application as it is described to be in docs for the XM8, then afterwards, just create an onLoad instruction and onOpen and onClose function so that it runs for that specific app in that specific slot, and then I just add into at the bottom of config.cpp and connect the class to what has been defined in one of those onLoad files inside of Apps\(Appname)\onLoad?

 

Better question: How do I edit those onLoad, onOpen, and onClose to work with a mod such as if I used a script for Advanced Server Info? Is there something specifically I just drag over from that code to run into the onLoad and then onOpen and onClose just leave it mostly as it is with minor changes to what it says to you?

Okay so I messed around with it a bit and I found this.

My onLoad:

Spoiler

/*
    File: rules.sqf
    For exile edited by Repentz
*/
disableSerialization;
[
    "",
    0,
    0.2,
    10,
    0,
    0,
    8
] spawn BIS_fnc_dynamicText;

createDialog "RscDisplayWelcome";

_display = findDisplay 999999;
_text1 = _display displayCtrl 1100;
_buttonSpoiler = _display displayctrl 2400;
_textSpoiler = _display displayctrl 1101;
_text2 = _display displayCtrl 1102;

_message = "";
_message = _message + "<t align='center' size='8' shadow='0'></t><br />";
_message = _message + "<t align='center' size='2' shadow='0'>Welcome to <a href='http://epochpro.clanwebsite.com/' color='#ff9900'>Exile Pro</a>, Arma 3 Altis Exile Custom!</t><br />";
_message = _message + "______________________________________________________________________________________<br /><br />";
_message = _message + "<t align='center' size='1' shadow='0'><a href='ts.epchpro.com' color='#ff9900'>TS3</a>: ts.epchpro.com<br />";
_message = _message + "Click this link to get to our website: <a href= 'http://epochpro.clanwebsite.com/' color='#ff9900'>Website</a><br />";
_message = _message + "Click this link to report a bug: <a href= 'http://epochpro.clanwebsite.com/board/248373' color='#ff9900'>Report a bug</a> This helps us out alot!<br />";
_message = _message + "Click this link for support: <a href= 'http://epochpro.clanwebsite.com/category/118537' color='#ff9900'>Support</a> This helps you out alot!</t><br /><br />";
_message = _message + "______________________________________________________________________________________<br /><br />";
_message = _message + "<t align='center' size='1' shadow='0'><t color='#ff9900'>Keybinds:</t><br />";
_message = _message + "<t color='#ff9900'>6</t> : XM8<br />";
_message = _message + "<t color='#ff9900'>5</t> : Lower Sound<br />";
_message = _message + "<t color='#ff9900'>4</t> : Holster and Unholster weapon<br /><br />";
_message = _message + "______________________________________________________________________________________<br /><br />";
_message = _message + "<t align='center' size='1' shadow='0'><t color='#ff9900'>Rules:</t><br />";
_message = _message + "- You will not exploit, duplicate, abuse, glitch, hack any mechanism on the server.<br /><br />";
_message = _message + "- You will report any exploitation, abuse, hacking, glitches, errors and/or bugs encountered on the server to the appropriate party.<br /><br />";
_message = _message + "- You understand that failure to report any breach in the rules of the server of another player makes you just as responsible as the offender.<br /><br />";
_message = _message + "- No building in military zones, across roads, or close to trader areas<br /><br />";
_message = _message + "- No camping outside safezones, stealing vehicles inside savezones, or harassing people inside safezones<br /><br />";
_message = _message + "- No racism, arguing over sidechat, talking in sidechat, or general harassment</t><br /><br />";
_message = _message + "Sincerely, <a color='#ff9900'>Exile Pro</a><br /><br />";


//Fill only the first text
_text1 ctrlSetStructuredText (parseText _message);

//Resize StructuredText component to display the scrollbar if needed
_positionText1 = ctrlPosition _text1;
_yText1 = _positionText1 select 1;
_hText1 = ctrlTextHeight _text1;
_text1 ctrlSetPosition [_positionText1 select 0, _yText1, _positionText1 select 2, _hText1];
_text1 ctrlcommit 0;
//Hide second text, spoiler text and button
_buttonSpoiler ctrlSetFade 1;
_buttonSpoiler ctrlCommit 0;
_buttonSpoiler ctrlEnable false;
_textSpoiler ctrlSetFade 1;
_textSpoiler ctrlCommit 0;
_text2 ctrlSetFade 1;
_text2 ctrlCommit 0;

params["_display","_slide","_idc"];

_pW = 0.025;
_pH = 0.04;
_leftCol = 1;
_leftColW = 12.8;
_rightCol = _leftCol + _leftColW + 2;
_rightColW = _leftColW + 3;
_margin = 0.2;

[_display,_slide,(["ExAd_Info","backButton"] call ExAd_fnc_getNextIDC),[27.6 * _pW, 17.7 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',STR_ExAd_VG_APP_BTN_BACK] call ExAd_fnc_createButton;

My onOpen:

Spoiler

//Empty for now

My onClose:

Spoiler

if (ExileClientXM8CurrentSlide == "ExAd_Info") then {
    ExileClientXM8CurrentSlide = "apps";
};
ExAdCurFlagNetId = nil;

 

When I open the XM8, it shows the message right away, the app "Server Info" shows up in more but when I click into it there is nothing in it at all that allows me to click out. How would I code this so that there is a primary button that says something like "Server Info" that you can press and then have another "Go Back" or "Close" button under it?

 

Thanks =)

Share this post


Link to post
Share on other sites
  • 0
On 8 juli 2016 at 4:16 AM, [ReSpec] Hunter said:

Okay so I messed around with it a bit and I found this.

My onLoad:

  Reveal hidden contents

/*
    File: rules.sqf
    For exile edited by Repentz
*/
disableSerialization;
[
    "",
    0,
    0.2,
    10,
    0,
    0,
    8
] spawn BIS_fnc_dynamicText;

createDialog "RscDisplayWelcome";

_display = findDisplay 999999;
_text1 = _display displayCtrl 1100;
_buttonSpoiler = _display displayctrl 2400;
_textSpoiler = _display displayctrl 1101;
_text2 = _display displayCtrl 1102;

_message = "";
_message = _message + "<t align='center' size='8' shadow='0'></t><br />";
_message = _message + "<t align='center' size='2' shadow='0'>Welcome to <a href='http://epochpro.clanwebsite.com/' color='#ff9900'>Exile Pro</a>, Arma 3 Altis Exile Custom!</t><br />";
_message = _message + "______________________________________________________________________________________<br /><br />";
_message = _message + "<t align='center' size='1' shadow='0'><a href='ts.epchpro.com' color='#ff9900'>TS3</a>: ts.epchpro.com<br />";
_message = _message + "Click this link to get to our website: <a href= 'http://epochpro.clanwebsite.com/' color='#ff9900'>Website</a><br />";
_message = _message + "Click this link to report a bug: <a href= 'http://epochpro.clanwebsite.com/board/248373' color='#ff9900'>Report a bug</a> This helps us out alot!<br />";
_message = _message + "Click this link for support: <a href= 'http://epochpro.clanwebsite.com/category/118537' color='#ff9900'>Support</a> This helps you out alot!</t><br /><br />";
_message = _message + "______________________________________________________________________________________<br /><br />";
_message = _message + "<t align='center' size='1' shadow='0'><t color='#ff9900'>Keybinds:</t><br />";
_message = _message + "<t color='#ff9900'>6</t> : XM8<br />";
_message = _message + "<t color='#ff9900'>5</t> : Lower Sound<br />";
_message = _message + "<t color='#ff9900'>4</t> : Holster and Unholster weapon<br /><br />";
_message = _message + "______________________________________________________________________________________<br /><br />";
_message = _message + "<t align='center' size='1' shadow='0'><t color='#ff9900'>Rules:</t><br />";
_message = _message + "- You will not exploit, duplicate, abuse, glitch, hack any mechanism on the server.<br /><br />";
_message = _message + "- You will report any exploitation, abuse, hacking, glitches, errors and/or bugs encountered on the server to the appropriate party.<br /><br />";
_message = _message + "- You understand that failure to report any breach in the rules of the server of another player makes you just as responsible as the offender.<br /><br />";
_message = _message + "- No building in military zones, across roads, or close to trader areas<br /><br />";
_message = _message + "- No camping outside safezones, stealing vehicles inside savezones, or harassing people inside safezones<br /><br />";
_message = _message + "- No racism, arguing over sidechat, talking in sidechat, or general harassment</t><br /><br />";
_message = _message + "Sincerely, <a color='#ff9900'>Exile Pro</a><br /><br />";


//Fill only the first text
_text1 ctrlSetStructuredText (parseText _message);

//Resize StructuredText component to display the scrollbar if needed
_positionText1 = ctrlPosition _text1;
_yText1 = _positionText1 select 1;
_hText1 = ctrlTextHeight _text1;
_text1 ctrlSetPosition [_positionText1 select 0, _yText1, _positionText1 select 2, _hText1];
_text1 ctrlcommit 0;
//Hide second text, spoiler text and button
_buttonSpoiler ctrlSetFade 1;
_buttonSpoiler ctrlCommit 0;
_buttonSpoiler ctrlEnable false;
_textSpoiler ctrlSetFade 1;
_textSpoiler ctrlCommit 0;
_text2 ctrlSetFade 1;
_text2 ctrlCommit 0;

params["_display","_slide","_idc"];

_pW = 0.025;
_pH = 0.04;
_leftCol = 1;
_leftColW = 12.8;
_rightCol = _leftCol + _leftColW + 2;
_rightColW = _leftColW + 3;
_margin = 0.2;

[_display,_slide,(["ExAd_Info","backButton"] call ExAd_fnc_getNextIDC),[27.6 * _pW, 17.7 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',STR_ExAd_VG_APP_BTN_BACK] call ExAd_fnc_createButton;

My onOpen:

  Reveal hidden contents

//Empty for now

My onClose:

  Reveal hidden contents

if (ExileClientXM8CurrentSlide == "ExAd_Info") then {
    ExileClientXM8CurrentSlide = "apps";
};
ExAdCurFlagNetId = nil;

 

When I open the XM8, it shows the message right away, the app "Server Info" shows up in more but when I click into it there is nothing in it at all that allows me to click out. How would I code this so that there is a primary button that says something like "Server Info" that you can press and then have another "Go Back" or "Close" button under it?

 

Thanks =)

If you go into the Dev branch of ExAd there is a server info app 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.