Add files via upload

This commit is contained in:
Beowulfv 2017-02-08 15:00:20 -05:00 committed by GitHub
parent 64590274f6
commit 1415f445e2
4 changed files with 102 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,69 @@
params["_display","_slide","_idc"];
private ["_baseMarker","_backbtn","_basePic","_Instruction","_OffBtn","_OnBtn","_newParent"];
disableSerialization;
_slideClass = "BaseMarker";
_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[0, -0.03, 34 * _pW, 0.76]] call ExAd_fnc_createCtrlGrp;
_newParent ctrlEnable true;
_OnBtn = _display ctrlCreate ["RscButtonMenu", 15002,_newParent];
_OnBtn ctrlSetPosition [(32 - 20) * (0.025),(20 - 10) * (0.04),6 * (0.025),1 * (0.04)];
_OnBtn ctrlCommit 0;
_OnBtn ctrlSetText "On";
_OnBtn ctrlSetEventHandler ["ButtonClick", "call fnc_markerOn"];
_OffBtn = _display ctrlCreate ["RscButtonMenu", 15003,_newParent];
_OffBtn ctrlSetPosition [(32 - 10) * (0.025),(20 - 10) * (0.04),6 * (0.025),1 * (0.04)];
_OffBtn ctrlCommit 0;
_OffBtn ctrlSetText "Off";
_OffBtn ctrlSetEventHandler ["ButtonClick", "call fnc_markerOff"];
_backbtn = _display ctrlCreate ["RscButtonMenu", 15004,_newParent];
_backbtn ctrlSetPosition [0.62,0.1,0.20,0.04];
_backbtn ctrlCommit 0;
_backbtn ctrlSetText "Go Back";
_backbtn ctrlSetEventHandler ["ButtonClick", "['extraApps', 1] call ExileClient_gui_xm8_slide"];
_Instruction = _display ctrlCreate ["RscStructuredText", 15005,_newParent];
_Instruction ctrlSetPosition [(5.8 - 3) * (0.025), (20 - 12) * (0.04), 7.2 * (0.12), 3.75 * (0.02)];
_Instruction ctrlCommit 0;
_Instruction ctrlSetStructuredText parseText "<t size='1' align='center'>Toggle your base markers (Only viewable by you):</t>";
fnc_markerOn = {
_playerUID = getPlayerUID player;
{
_flag = _x;
_buildRights = _flag getVariable ["ExileTerritoryBuildRights", []];
if (_playerUID in _buildRights) then
{
_name = _flag getVariable ["ExileTerritoryName", ""];
_pos = getPos _flag;
_marker = createMarkerLocal [_name, _pos];
_marker setMarkerTextLocal _name;
_marker setMarkerTypeLocal "mil_flag";
_marker setMarkerColorLocal "ColorYellow"
};
}
forEach (allMissionObjects "Exile_Construction_Flag_Static");
["Success",["Base Markers toggled on."]] call BIS_fnc_showNotification;
};
fnc_markerOff = {
_playerUID = getPlayerUID player;
{
_flag = _x;
_buildRights = _flag getVariable ["ExileTerritoryBuildRights", []];
if (_playerUID in _buildRights) then
{
_name = _flag getVariable ["ExileTerritoryName", ""];
_pos = getPos _flag;
deleteMarkerLocal _name;
};
}
forEach (allMissionObjects "Exile_Construction_Flag_Static");
["Whoops",["Base Markers toggled off."]] call BIS_fnc_showNotification;
};

View File

@ -0,0 +1,21 @@
///////////////
//Installation
//////////////
Add BaseMarker folder to your ExAd XM8 Apps folder
Exile.Mission > ExAdClient > XM8 > Apps > Place_Folder
Open your config.cpp file
Locate class CfgXM8
Add "BaseMarker" to the extraApps line
Add the folowing line in the CfgXM8 class
class BaseMarker
{
controlID = 50500;
title = "Base Marker";
logo = "ExAdClient\XM8\Apps\BaseMarker\BaseMarker.paa";
onLoad = "ExAdClient\XM8\Apps\BaseMarker\onLoad.sqf";
};
You're Done!

View File

@ -0,0 +1,12 @@
class CfgXM8
{
extraApps[] = {"BaseMarker"};
class BaseMarker
{
controlID = 50500;
title = "Base Marker";
logo = "ExAdClient\XM8\Apps\BaseMarker\BaseMarker.paa";
onLoad = "ExAdClient\XM8\Apps\BaseMarker\onLoad.sqf";
};
};