mirror of
https://github.com/Beowulfv/BaseMarkers_ExAd.git
synced 2024-08-30 17:22:15 +00:00
Add files via upload
This commit is contained in:
parent
64590274f6
commit
1415f445e2
BIN
BaseMarker_ExAd/BaseMarker/BaseMarker.paa
Normal file
BIN
BaseMarker_ExAd/BaseMarker/BaseMarker.paa
Normal file
Binary file not shown.
69
BaseMarker_ExAd/BaseMarker/onLoad.sqf
Normal file
69
BaseMarker_ExAd/BaseMarker/onLoad.sqf
Normal 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;
|
||||
};
|
21
BaseMarker_ExAd/Installation.txt
Normal file
21
BaseMarker_ExAd/Installation.txt
Normal 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!
|
12
BaseMarker_ExAd/config.cpp
Normal file
12
BaseMarker_ExAd/config.cpp
Normal 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";
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user