mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'agmMapPort' of github.com:KoffeinFlummi/ACE3
This commit is contained in:
commit
9a790a229a
@ -1,87 +0,0 @@
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ColorBlack: RscButton {
|
||||
idc = 36732;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {0,0,0,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorBlack""]";
|
||||
};
|
||||
class ColorRed: RscButton {
|
||||
idc = 36733;
|
||||
x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {1,0,0,1};
|
||||
colorFocused[] = {1,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorRed""]";
|
||||
};
|
||||
class ColorGreen: RscButton {
|
||||
idc = 36734;
|
||||
x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {0,1,0,1};
|
||||
colorFocused[] = {0,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorGreen""]";
|
||||
};
|
||||
class ColorBlue: RscButton {
|
||||
idc = 36735;
|
||||
x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.8,1};
|
||||
colorBackgroundActive[] = {0,0,1,1};
|
||||
colorFocused[] = {0,0,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorBlue""]";
|
||||
};
|
||||
class ColorYellow: RscButton {
|
||||
idc = 36736;
|
||||
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {1,1,0,1};
|
||||
colorFocused[] = {1,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorYellow""]";
|
||||
};
|
||||
class ColorWhite: RscButton {
|
||||
idc = 36737;
|
||||
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.8,1};
|
||||
colorBackgroundActive[] = {1,1,1,1};
|
||||
colorFocused[] = {1,1,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorWhite""]";
|
||||
};
|
||||
};
|
@ -1,154 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
if (!hasInterface) exitWith{};
|
||||
|
||||
[] spawn {
|
||||
while {true} do {
|
||||
sleep 5;
|
||||
_markers = [];
|
||||
|
||||
while {AGM_Map_BFT_Enabled and {(!isNil "AGM_player") and {alive AGM_player}}} do {
|
||||
|
||||
_groups = [];
|
||||
_playerSide = call AGM_Core_fnc_playerSide;
|
||||
|
||||
if (AGM_Map_BFT_HideAiGroups) then {
|
||||
_groups = [allGroups, {side _this == _playerSide}] call AGM_Core_fnc_filter;
|
||||
} else {
|
||||
_groups = [allGroups, {
|
||||
_anyPlayers = {
|
||||
[_x] call AGM_Core_fnc_isPlayer
|
||||
} count units _this;
|
||||
(side _this == _playerSide) && _anyPlayers > 0
|
||||
}] call AGM_Core_fnc_filter;
|
||||
};
|
||||
|
||||
{
|
||||
deleteMarkerLocal _x;
|
||||
} forEach _markers;
|
||||
_markers = [];
|
||||
|
||||
for "_i" from 0 to (count _groups - 1) do {
|
||||
_group1 = _groups select _i;
|
||||
|
||||
_markerType = [_group1] call AGM_Core_fnc_getMarkerType;
|
||||
|
||||
_colour = format ["Color%1", side _group1];
|
||||
|
||||
_marker = createMarkerLocal [format ["AGM_BFT_%1", _i], [(getPos leader _group1) select 0, (getPos leader _group1) select 1]];
|
||||
_marker setMarkerTypeLocal _markerType;
|
||||
_marker setMarkerColorLocal _colour;
|
||||
_marker setMarkerTextLocal (groupID _group1);
|
||||
|
||||
_markers pushBack _marker;
|
||||
};
|
||||
|
||||
sleep AGM_Map_BFT_Interval;
|
||||
};
|
||||
|
||||
// Delete markers as soon as the player dies
|
||||
{
|
||||
deleteMarkerLocal _x;
|
||||
} forEach _markers;
|
||||
};
|
||||
};
|
||||
|
||||
[] spawn {
|
||||
// Init variables
|
||||
AGM_Map_mapToolsShown = 0;
|
||||
AGM_Map_pos = [0,0];
|
||||
AGM_Map_angle = 0;
|
||||
AGM_Map_dragging = false;
|
||||
AGM_Map_rotating = false;
|
||||
AGM_Map_mapGpsShow = true;
|
||||
AGM_Map_drawing = false;
|
||||
AGM_Map_tempLineMarker = [];
|
||||
AGM_Map_lineMarkers = [];
|
||||
|
||||
AGM_Map_drawColor = "ColorBlack";
|
||||
AGM_Map_drawingControls = [36732, 36733, 36734, 36735, 36736, 36737];
|
||||
|
||||
AGM_Map_fnc_installEvents = {
|
||||
_d = _this;
|
||||
diag_log format ["Installing EH in display %1", _d];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call AGM_Map_fnc_handleMouseMove;}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call AGM_Map_fnc_handleMouseButton;}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call AGM_Map_fnc_handleMouseButton}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call AGM_Map_fnc_updateMapToolMarkers;}];
|
||||
(finddisplay _d) displayAddEventHandler ["KeyDown", {_this call AGM_Map_fnc_handleKeyDown;}];
|
||||
};
|
||||
|
||||
// Wait until the briefing map is detected
|
||||
// display = 37 for SP
|
||||
// display = 52 for host server on MP;
|
||||
// display = 53 for MP clients)
|
||||
waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)};
|
||||
|
||||
if (isNull findDisplay 12) then {
|
||||
// Install event handlers on the map control of the briefing screen (control = 51)
|
||||
AGM_Map_syncMarkers = true;
|
||||
if (!isNull findDisplay 52) then {
|
||||
52 call AGM_Map_fnc_installEvents;
|
||||
} else {
|
||||
if (!isNull findDisplay 53) then {
|
||||
53 call AGM_Map_fnc_installEvents;
|
||||
} else {
|
||||
37 call AGM_Map_fnc_installEvents;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Briefing screen was skipped; the player is JIP, create the markers defined during the briefing
|
||||
AGM_Map_syncMarkers = false;
|
||||
{
|
||||
_x call AGM_Map_fnc_addLineMarker;
|
||||
} forEach AGM_Map_serverLineMarkers;
|
||||
};
|
||||
|
||||
// Wait until the main map display is detected (display = 12)
|
||||
waitUntil { !isNull findDisplay 12 };
|
||||
// Install event handlers on the map control and display (control = 51)
|
||||
AGM_Map_syncMarkers = false;
|
||||
12 call AGM_Map_fnc_installEvents;
|
||||
|
||||
// Update the size and rotation of map tools
|
||||
[] call AGM_Map_fnc_updateMapToolMarkers;
|
||||
|
||||
while {true} do {
|
||||
waitUntil {visibleMap};
|
||||
|
||||
// Show and update map tools if required
|
||||
[] call AGM_Map_fnc_updateMapToolMarkers;
|
||||
// Show GPS if required
|
||||
[AGM_Map_mapGpsShow] call AGM_Map_fnc_openMapGps;
|
||||
|
||||
// Update visibility of maptools and gps, handling inventory changes
|
||||
[] spawn {
|
||||
while {visibleMap} do {
|
||||
// Show/Hide draw buttons
|
||||
if ("AGM_MapTools" in items player) then {
|
||||
{ ((finddisplay 12) displayctrl _x) ctrlShow true; } forEach AGM_Map_drawingControls;
|
||||
} else {
|
||||
{ ((finddisplay 12) displayctrl _x) ctrlShow false; } forEach AGM_Map_drawingControls;
|
||||
if (AGM_Map_drawing) then {
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
};
|
||||
};
|
||||
sleep 1;
|
||||
};
|
||||
};
|
||||
|
||||
waitUntil {!visibleMap};
|
||||
|
||||
// Hide GPS
|
||||
[false] call AGM_Map_fnc_openMapGps;
|
||||
// Hide Map tools
|
||||
deleteMarkerLocal "AGM_MapToolFixed";
|
||||
deleteMarkerLocal "AGM_MapToolRotatingNormal";
|
||||
deleteMarkerLocal "AGM_MapToolRotatingSmall";
|
||||
AGM_Map_mapToolFixed = nil;
|
||||
AGM_Map_mapToolRotatingNormal = nil;
|
||||
AGM_Map_mapToolRotatingSmall = nil;
|
||||
// Cancel drawing
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
};
|
||||
};
|
@ -1,423 +0,0 @@
|
||||
class CfgPatches {
|
||||
class AGM_Map {
|
||||
units[] = {};
|
||||
weapons[] = {"AGM_MapTools"};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {AGM_Core, AGM_Interaction};
|
||||
version = "0.95";
|
||||
versionStr = "0.95";
|
||||
versionAr[] = {0,95,0};
|
||||
author[] = {"KoffeinFlummi","CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class AGM_Map {
|
||||
class AGM_Map {
|
||||
file = "AGM_Map\functions";
|
||||
class addLineMarker;
|
||||
class blueForceTracking;
|
||||
class calculateMapScale;
|
||||
class cancelDrawing;
|
||||
class canDraw;
|
||||
class canUseMapTools;
|
||||
class canUseMapGPS;
|
||||
class copyMapMarkers;
|
||||
class handleKeyDown;
|
||||
class handleMouseButton;
|
||||
class handleMouseMove;
|
||||
class handleMouseZChanged;
|
||||
class isInsideMapTool;
|
||||
class openMapGps;
|
||||
class removeLineMarker;
|
||||
class sendMapMarkers;
|
||||
class updateMapToolMarkers;
|
||||
class updateLineMarker;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class AGM_Map {
|
||||
serverInit = "call compile preprocessFileLineNumbers '\AGM_Map\serverInit.sqf'";
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class AGM_Map {
|
||||
clientInit = "call compile preprocessFileLineNumbers 'AGM_Map\clientInit.sqf'";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgWeapons {
|
||||
class AGM_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class AGM_MapTools: AGM_ItemCore {
|
||||
displayName = "$STR_AGM_MapTools_Name";
|
||||
descriptionShort = "$STR_AGM_MapTools_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = "\AGM_Map\UI\maptool_item.paa";
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class AGM_SelfActions {
|
||||
|
||||
class AGM_MapTools {
|
||||
displayName = "$STR_AGM_Map_MapTools_Menu";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) || (call AGM_Map_fnc_canUseMapGPS)";
|
||||
statement = "";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 0;
|
||||
priority = 100;
|
||||
subMenu[] = {"AGM_MapTools", 1};
|
||||
enableInside = 1;
|
||||
|
||||
class AGM_MapToolsHide {
|
||||
displayName = "$STR_AGM_Map_MapToolsHide";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown > 0}";
|
||||
statement = "AGM_Map_mapToolsShown = 0; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 5;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapToolsShowNormal {
|
||||
displayName = "$STR_AGM_Map_MapToolsShowNormal";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown != 1}";
|
||||
statement = "AGM_Map_mapToolsShown = 1; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapToolsShowSmall {
|
||||
displayName = "$STR_AGM_Map_MapToolsShowSmall";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown != 2}";
|
||||
statement = "AGM_Map_mapToolsShown = 2; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 3;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapToolsAlignNorth {
|
||||
displayName = "$STR_AGM_Map_MapToolsAlignNorth";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown != 0}";
|
||||
statement = "AGM_Map_angle = 0; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapToolsAlignCompass {
|
||||
displayName = "$STR_AGM_Map_MapToolsAlignCompass";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown != 0} && {(""ItemCompass"" in assignedItems player) || {""ItemGPS"" in assignedItems player}}";
|
||||
statement = "AGM_Map_angle = getDir player; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapGpsShow {
|
||||
displayName = "$STR_AGM_Map_MapGpsShow";
|
||||
condition = "(call AGM_Map_fnc_canUseMapGPS) && {!AGM_Map_mapGpsShow}";
|
||||
statement = "AGM_Map_mapGpsShow = true; [AGM_Map_mapGpsShow] call AGM_Map_fnc_openMapGps";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapGpsHide {
|
||||
displayName = "$STR_AGM_Map_MapGpsHide";
|
||||
condition = "(call AGM_Map_fnc_canUseMapGPS) && AGM_Map_mapGpsShow";
|
||||
statement = "AGM_Map_mapGpsShow = false; [AGM_Map_mapGpsShow] call AGM_Map_fnc_openMapGps";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Actions {
|
||||
class AGM_CopyMap {
|
||||
displayName = "$STR_AGM_Map_CopyMap";
|
||||
condition = "isPlayer AGM_Interaction_Target && {""ItemMap"" in assignedItems player} && {""AGM_MapTools"" in items player} && {""ItemMap"" in assignedItems AGM_Interaction_Target}";
|
||||
statement = "[player, ""AGM_Map_fnc_sendMapMarkers"", AGM_Interaction_Target] call AGM_Core_fnc_execRemoteFnc";
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Module_F;
|
||||
class AGM_ModuleBlueForceTracking: Module_F {
|
||||
author = "AGM Team";
|
||||
category = "AGM";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = "AGM_Map_fnc_blueForceTracking";
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = "\AGM_Map\UI\IconBFTracking_ca.paa";
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class RscControlsGroup;
|
||||
class RscActiveText;
|
||||
class RscPicture;
|
||||
class RscText;
|
||||
class RscObject;
|
||||
class RscButton;
|
||||
class RscButtonMenuOK;
|
||||
class RscButtonMenuCancel;
|
||||
class RscButtonMenu;
|
||||
class RscEdit;
|
||||
|
||||
class RscMapControl {
|
||||
sizeExGrid = 0.032;
|
||||
};
|
||||
|
||||
// REGULAR MAP
|
||||
class RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// DIARY
|
||||
class RscDisplayDiary {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// BRIEFING SCREEN
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// MARKERS
|
||||
class CfgMarkers {
|
||||
class Flag;
|
||||
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
|
||||
|
||||
class AGM_MapToolFixed {
|
||||
name = "MapToolFixed";
|
||||
icon = "\AGM_Map\data\mapToolFixed.paa";
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class AGM_MapToolRotatingNormal {
|
||||
name = "MapToolRotating";
|
||||
icon = "\AGM_Map\data\mapToolRotatingNormal.paa";
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class AGM_MapToolRotatingSmall {
|
||||
name = "MapToolRotating";
|
||||
icon = "\AGM_Map\data\mapToolRotatingSmall.paa";
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Parameters_Numeric {
|
||||
AGM_Map_BFT_Interval = 1;
|
||||
};
|
||||
class AGM_Parameters_Boolean {
|
||||
AGM_Map_EveryoneCanDrawOnBriefing = 1;
|
||||
AGM_Map_BFT_Enabled = 0;
|
||||
AGM_Map_BFT_HideAiGroups = 0;
|
||||
};
|
||||
|
||||
#include "MapGpsUI.hpp"
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
*
|
||||
* Initializes the blue force tracking module.
|
||||
*
|
||||
* Arguments:
|
||||
* Whatever the module provides. (I dunno.)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
|
||||
if !(hasInterface) exitWith {};
|
||||
|
||||
_logic = _this select 0;
|
||||
_units = _this select 1;
|
||||
_activated = _this select 2;
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
_logic spawn {
|
||||
waitUntil {alive player};
|
||||
|
||||
AGM_Map_BFT_Enabled = true;
|
||||
[_this, "AGM_Map_BFT_Interval", "Interval"] call AGM_Core_fnc_readNumericParameterFromModule;
|
||||
[_this, "AGM_Map_BFT_HideAiGroups", "HideAiGroups"] call AGM_Core_fnc_readBooleanParameterFromModule;
|
||||
|
||||
diag_log text "[AGM]: Blue Force Tracking Module initialized.";
|
||||
};
|
@ -1,4 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
(missionNameSpace getVariable ["AGM_Map_syncMarkers", true] && {AGM_Map_EveryoneCanDrawOnBriefing}) ||
|
||||
{(!isNull player) && {"AGM_MapTools" in items player}}
|
@ -1,5 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
visibleMap &&
|
||||
{alive player} &&
|
||||
{"ItemGPS" in assignedItems player}
|
@ -1,8 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
visibleMap &&
|
||||
{alive player} &&
|
||||
{"ItemMap" in assignedItems player} &&
|
||||
{"AGM_MapTools" in items player} &&
|
||||
{!AGM_Map_dragging} &&
|
||||
{!AGM_Map_rotating}
|
@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Cancel the drawing of the current line marker
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
AGM_Map_drawing = false;
|
||||
if (count AGM_Map_tempLineMarker > 0) then {
|
||||
deleteMarkerLocal (AGM_Map_tempLineMarker select 0);
|
||||
};
|
||||
AGM_Map_tempLineMarker = [];
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Copy markers to mapd
|
||||
*
|
||||
* Argument:
|
||||
* 0: Array of markers to copy (Array)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
_lineMarkers = _this;
|
||||
|
||||
{
|
||||
_marker = _x;
|
||||
|
||||
if (({(_x select 0) == (_marker select 0)} count AGM_Map_lineMarkers) == 0) then {
|
||||
_marker call AGM_Map_fnc_addLineMarker;
|
||||
};
|
||||
} forEach _lineMarkers;
|
@ -1,98 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse buttons.
|
||||
*
|
||||
* Argument:
|
||||
* 0: 1 if mouse down down, 0 if mouse button up (Number)
|
||||
* 1: Parameters of the mouse button event
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_dir = _this select 0;
|
||||
_params = _this select 1;
|
||||
_control = _params select 0;
|
||||
_button = _params select 1;
|
||||
_screenPos = [_params select 2, _params select 3];
|
||||
_shiftKey = _params select 4;
|
||||
_ctrlKey = _params select 5;
|
||||
_altKey = _params select 6;
|
||||
_handled = false;
|
||||
|
||||
// If it's not a left button event, exit
|
||||
if (_button != 0) exitWith {};
|
||||
|
||||
// If releasing
|
||||
if (_dir != 1 && (AGM_Map_dragging or AGM_Map_rotating)) exitWith {
|
||||
AGM_Map_dragging = false;
|
||||
AGM_Map_rotating = false;
|
||||
_handled = true;
|
||||
_handled
|
||||
};
|
||||
|
||||
// If clicking
|
||||
if (_dir == 1) exitWith {
|
||||
|
||||
if !(call AGM_Map_fnc_canDraw) exitWith {_handled = false;};
|
||||
|
||||
// Transform mouse screen position to coordinates
|
||||
_pos = _control ctrlMapScreenToWorld _screenPos;
|
||||
_pos set [count _pos, 0];
|
||||
|
||||
if (AGM_Map_drawing) exitWith {
|
||||
// Already drawing -> Add tempLineMarker to permanent list
|
||||
if (AGM_Map_syncMarkers) then {
|
||||
deleteMarkerLocal (AGM_Map_tempLineMarker select 0);
|
||||
[AGM_Map_tempLineMarker, "AGM_Map_fnc_addLineMarker", 2] call AGM_Core_fnc_execRemoteFnc;
|
||||
// Log who drew on the briefing screen
|
||||
(text format ["[AGM] Server: Player %1 drew on the briefing screen", name player]) call AGM_Core_fnc_serverLog;
|
||||
} else {
|
||||
AGM_Map_tempLineMarker call AGM_Map_fnc_updateLineMarker;
|
||||
AGM_Map_lineMarkers pushBack (+AGM_Map_tempLineMarker);
|
||||
};
|
||||
AGM_Map_tempLineMarker = [];
|
||||
AGM_Map_drawing = false;
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
if (_altKey) exitWith {
|
||||
// Start drawing
|
||||
AGM_Map_drawing = true;
|
||||
// Create tempLineMarker
|
||||
_gui = format ["%1%2%3%4", random (100), random (100), random (100), random (100)];
|
||||
AGM_Map_tempLineMarker = [_gui, + _pos, + _pos, AGM_Map_drawColor];
|
||||
_marker = createMarkerLocal [_gui, [0,0]];
|
||||
AGM_Map_tempLineMarker call AGM_Map_fnc_updateLineMarker;
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
AGM_Map_dragging = false;
|
||||
AGM_Map_rotating = false;
|
||||
|
||||
// If no map tool marker then exit
|
||||
if (isNil "AGM_Map_mapToolFixed") exitWith {_handled = false;};
|
||||
|
||||
// Check if clicking the maptool
|
||||
if (_pos call AGM_Map_fnc_isInsideMapTool) exitWith {
|
||||
// Store data for dragging
|
||||
AGM_Map_startPos = + AGM_Map_pos;
|
||||
AGM_Map_startDragPos = + _pos;
|
||||
if (_ctrlKey) then {
|
||||
// Store data for rotating
|
||||
AGM_Map_startAngle = + AGM_Map_angle;
|
||||
AGM_Map_startDragAngle = (180 + ((AGM_Map_startDragPos select 0) - (AGM_Map_startPos select 0)) atan2 ((AGM_Map_startDragPos select 1) - (AGM_Map_startPos select 1)) mod 360);
|
||||
// Start rotating
|
||||
AGM_Map_rotating = true;
|
||||
} else {
|
||||
// Start dragging
|
||||
AGM_Map_dragging = true;
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
|
||||
_handled
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse movement over the map tool.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Map Control
|
||||
* 1: Mouse position on screen coordinates
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
private ["_control", "_pos"];
|
||||
|
||||
_control = _this select 0;
|
||||
_pos = [_this select 1, _this select 2];
|
||||
AGM_Map_mousePos = _control ctrlMapScreenToWorld _pos;
|
||||
AGM_Map_mousePos set [count AGM_Map_mousePos, 0];
|
||||
|
||||
// If cannot draw then exit
|
||||
if !(call AGM_Map_fnc_canDraw) exitWith {
|
||||
// If was drawing, cancel
|
||||
if (AGM_Map_drawing) then {
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
};
|
||||
false
|
||||
};
|
||||
|
||||
// Handle drawing
|
||||
if (AGM_Map_drawing) exitWith {
|
||||
AGM_Map_tempLineMarker set [2, AGM_Map_mousePos];
|
||||
AGM_Map_tempLineMarker call AGM_Map_fnc_updateLineMarker;
|
||||
false
|
||||
};
|
||||
|
||||
// Handle Map tools
|
||||
if (isNil "AGM_Map_mapToolFixed") exitWith {false};
|
||||
|
||||
// Translation
|
||||
if (AGM_Map_dragging) exitWith {
|
||||
AGM_Map_pos set [0, (AGM_Map_startPos select 0) + (AGM_Map_mousePos select 0) - (AGM_Map_startDragPos select 0)];
|
||||
AGM_Map_pos set [1, (AGM_Map_startPos select 1) + (AGM_Map_mousePos select 1) - (AGM_Map_startDragPos select 1)];
|
||||
|
||||
// Update the size and rotation of the maptool
|
||||
[] call AGM_Map_fnc_updateMapToolMarkers;
|
||||
true
|
||||
};
|
||||
|
||||
// Rotation
|
||||
if (AGM_Map_rotating) exitWith {
|
||||
// Get new angle
|
||||
_angle = (180 + ((AGM_Map_mousePos select 0) - (AGM_Map_startPos select 0)) atan2 ((AGM_Map_mousePos select 1) - (AGM_Map_startPos select 1)) mod 360);
|
||||
AGM_Map_angle = AGM_Map_startAngle + _angle - AGM_Map_startDragAngle;
|
||||
|
||||
// Update the size and rotation of the maptool
|
||||
[] call AGM_Map_fnc_updateMapToolMarkers;
|
||||
true
|
||||
};
|
||||
|
||||
false
|
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse wheel.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Control
|
||||
* 1: Scroll Amount
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_control = _this select 0;
|
||||
_dir = _this select 1;
|
||||
diag_log "Scroll";
|
||||
diag_log _this;
|
||||
_handled = false;
|
||||
|
||||
// If drawing, change line color
|
||||
if (count AGM_Map_tempLineMarker > 0) then {
|
||||
AGM_Map_drawColor = if (_dir > 0) then {AGM_Map_drawColor + 1} else {AGM_Map_drawColor - 1};
|
||||
if (AGM_Map_drawColor >= count AGM_Map_drawColors) then {
|
||||
AGM_Map_drawColor = AGM_Map_drawColor - count AGM_Map_drawColors;
|
||||
};
|
||||
if (AGM_Map_drawColor < 0) then {
|
||||
AGM_Map_drawColor = AGM_Map_drawColor + count AGM_Map_drawColors;
|
||||
};
|
||||
AGM_Map_tempLineMarker set [3, AGM_Map_drawColor];
|
||||
AGM_Map_tempLineMarker call AGM_Map_fnc_updateLineMarker;
|
||||
|
||||
_handled = true;
|
||||
};
|
||||
_handled
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Opens or closes the gps on the map screen, showing coordinates
|
||||
*
|
||||
* Argument:
|
||||
* 0: Open GPS? (Boolean)
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
|
||||
_open = _this select 0;
|
||||
_isOpen = !(isNull (uiNamespace getVariable ['AGM_Map_mapGpsDisplay', displayNull]));
|
||||
|
||||
if (_open && {"ItemGPS" in assignedItems player} && {!_isOpen}) then {
|
||||
("AGM_mapGpsLayer" call BIS_fnc_rscLayer) cutRsc ["RscAGM_MapGps","PLAIN"];
|
||||
|
||||
// Spawn a thread to update gps display
|
||||
[] spawn {
|
||||
disableSerialization;
|
||||
while {!(isNull (uiNamespace getVariable ['AGM_Map_mapGpsDisplay', displayNull]))} do {
|
||||
if !("ItemGPS" in assignedItems player) exitWith {};
|
||||
|
||||
_mapGpsDisplay = uiNamespace getVariable ['AGM_Map_mapGpsDisplay', displayNull];
|
||||
_ctrl = _mapGpsDisplay displayCtrl 913590;
|
||||
_ctrl ctrlSetText str(round(getDir player));
|
||||
_ctrl = _mapGpsDisplay displayCtrl 913591;
|
||||
_ctrl ctrlSetText str(round((getPosASL player) select 2));
|
||||
_ctrl = _mapGpsDisplay displayCtrl 913592;
|
||||
_ctrl ctrlSetText mapGridPosition player;
|
||||
|
||||
sleep 0.5;
|
||||
};
|
||||
("AGM_mapGpsLayer" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
("AGM_mapGpsLayer" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||
};
|
||||
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Remove the line marker
|
||||
*
|
||||
* Argument:
|
||||
* 0: Marker Name (string)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
_name = _this select 0;
|
||||
|
||||
deleteMarkerLocal _name;
|
||||
{
|
||||
if ((_x select 0) == _name) exitWith {
|
||||
AGM_Map_lineMarkers = AGM_Map_lineMarkers - [_x];
|
||||
};
|
||||
} forEach AGM_Map_lineMarkers;
|
||||
|
||||
if (isServer && AGM_Map_syncMarkers) then {
|
||||
{
|
||||
if ((_x select 0) == _name) exitWith {
|
||||
AGM_Map_serverLineMarkers = AGM_Map_serverLineMarkers - [_x];
|
||||
publicVariable "AGM_Map_serverLineMarkers";
|
||||
};
|
||||
} forEach AGM_Map_serverLineMarkers;
|
||||
};
|
@ -1,13 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Send Map markers to other player
|
||||
*
|
||||
* Argument:
|
||||
* 0: Target player (Unit)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
[AGM_Map_lineMarkers, "AGM_Map_fnc_copyMapMarkers", _this] call AGM_Core_fnc_execRemoteFnc;
|
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Update the map tool markers, position, size, rotation and visibility.
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
#define TEXTURE_WIDTH_IN_M 6205
|
||||
#define CENTER_OFFSET_Y_PERC 0.1606
|
||||
#define CONSTANT_SCALE 0.2
|
||||
|
||||
// If markers exist and they should'nt, delete them
|
||||
if (!("AGM_MapTools" in items player) || {AGM_Map_mapToolsShown == 0}) then {
|
||||
// If markers exist, delete them
|
||||
if (!isNil "AGM_Map_mapToolFixed") then {
|
||||
deleteMarkerLocal "AGM_MapToolFixed";
|
||||
AGM_Map_mapToolFixed = nil;
|
||||
};
|
||||
};
|
||||
if (!("AGM_MapTools" in items player) || {AGM_Map_mapToolsShown != 1}) then {
|
||||
if (!isNil "AGM_Map_mapToolRotatingNormal") then {
|
||||
deleteMarkerLocal "AGM_MapToolRotatingNormal";
|
||||
AGM_Map_mapToolRotatingNormal = nil;
|
||||
};
|
||||
};
|
||||
if (!("AGM_MapTools" in items player) || {AGM_Map_mapToolsShown != 2}) then {
|
||||
if (!isNil "AGM_Map_mapToolRotatingSmall") then {
|
||||
deleteMarkerLocal "AGM_MapToolRotatingSmall";
|
||||
AGM_Map_mapToolRotatingSmall = nil;
|
||||
};
|
||||
};
|
||||
|
||||
if (!("AGM_MapTools" in items player)|| {AGM_Map_mapToolsShown == 0}) exitWith {};
|
||||
|
||||
// If markers don't exist and should, create them
|
||||
if (isNil "AGM_Map_mapToolFixed") then {
|
||||
AGM_Map_mapToolFixed = createMarkerLocal ["AGM_MapToolFixed", AGM_Map_pos];
|
||||
"AGM_MapToolFixed" setMarkerType "AGM_MapToolFixed";
|
||||
};
|
||||
if ((isNil "AGM_Map_mapToolRotatingNormal") && {AGM_Map_mapToolsShown == 1}) then {
|
||||
AGM_Map_mapToolRotatingNormal = createMarkerLocal ["AGM_MapToolRotatingNormal", AGM_Map_pos];
|
||||
"AGM_MapToolRotatingNormal" setMarkerType "AGM_MapToolRotatingNormal";
|
||||
};
|
||||
if ((isNil "AGM_Map_mapToolRotatingSmall") && {AGM_Map_mapToolsShown == 2}) then {
|
||||
AGM_Map_mapToolRotatingSmall = createMarkerLocal ["AGM_MapToolRotatingSmall", AGM_Map_pos];
|
||||
"AGM_MapToolRotatingSmall" setMarkerType "AGM_MapToolRotatingSmall";
|
||||
};
|
||||
|
||||
_rotatingMarker = ["AGM_MapToolRotatingNormal", "AGM_MapToolRotatingSmall"] select (AGM_Map_mapToolsShown - 1);
|
||||
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (AGM_Map_mapToolsShown - 1);
|
||||
|
||||
// Update scale of both parts
|
||||
_scale = _textureWidth * CONSTANT_SCALE * (call AGM_Map_fnc_calculateMapScale);
|
||||
"AGM_MapToolFixed" setMarkerSizeLocal [_scale,_scale];
|
||||
_rotatingMarker setMarkerSizeLocal [_scale,_scale];
|
||||
|
||||
// Position of the fixed part
|
||||
_xPos = AGM_Map_pos select 0;
|
||||
_yPos = (AGM_Map_pos select 1) + _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||
"AGM_MapToolFixed" setMarkerPosLocal [_xPos,_yPos];
|
||||
|
||||
// Position and rotation of the rotating part
|
||||
_xPos = (AGM_Map_pos select 0) + sin(AGM_Map_angle) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||
_yPos = (AGM_Map_pos select 1) + cos(AGM_Map_angle) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||
_rotatingMarker setMarkerPosLocal [_xPos,_yPos];
|
||||
_rotatingMarker setMarkerDirLocal AGM_Map_angle;
|
@ -1,4 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
AGM_Map_serverLineMarkers = [];
|
||||
publicVariable "AGM_Map_serverLineMarkers";
|
1
addons/map/$PBOPREFIX$
Normal file
1
addons/map/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\Addons\map
|
12
addons/map/CfgEventHandlers.hpp
Normal file
12
addons/map/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
serverInit = QUOTE( call COMPILE_FILE(XEH_preInitServer) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
};
|
67
addons/map/CfgMarkers.hpp
Normal file
67
addons/map/CfgMarkers.hpp
Normal file
@ -0,0 +1,67 @@
|
||||
// MARKERS
|
||||
class CfgMarkers {
|
||||
class Flag;
|
||||
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
|
||||
|
||||
class ACE_MapToolFixed {
|
||||
name = "MapToolFixed";
|
||||
icon = PATHTOF(data\mapToolFixed.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingNormal {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingNormal.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingSmall {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingSmall.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
};
|
159
addons/map/CfgVehicles.hpp
Normal file
159
addons/map/CfgVehicles.hpp
Normal file
@ -0,0 +1,159 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
|
||||
class ACE_MapTools {
|
||||
displayName = "$STR_ACE_Map_MapTools_Menu";
|
||||
condition = QUOTE(call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)});
|
||||
statement = "";
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Core_notOnMap"};
|
||||
showDisabled = 0;
|
||||
priority = 100;
|
||||
subMenu[] = {"ACE_MapTools", 1};
|
||||
enableInside = 1;
|
||||
|
||||
class ACE_MapToolsHide {
|
||||
displayName = "$STR_ACE_Map_MapToolsHide";
|
||||
condition = QUOTE(call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0});
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 5;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowNormal {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowNormal";
|
||||
condition = QUOTE(call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1});
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowSmall {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowSmall";
|
||||
condition = QUOTE(call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2});
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 3;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignNorth {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignNorth";
|
||||
condition = QUOTE(call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0});
|
||||
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignCompass {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignCompass";
|
||||
condition = QUOTE(call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}});
|
||||
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsShow {
|
||||
displayName = "$STR_ACE_Map_MapGpsShow";
|
||||
condition = QUOTE(call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)});
|
||||
statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Core_notOnMap"};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsHide {
|
||||
displayName = "$STR_ACE_Map_MapGpsHide";
|
||||
condition = QUOTE(call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)});
|
||||
statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", "ACE_Core_notOnMap"};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_CopyMap {
|
||||
displayName = "$STR_ACE_Map_CopyMap";
|
||||
condition = QUOTE([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target});
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart));
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Module_F;
|
||||
class ACE_ModuleBlueForceTracking: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = QFUNC(blueForceTrackingModule);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = PATHTOF(UI\IconBFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
15
addons/map/CfgWeapons.hpp
Normal file
15
addons/map/CfgWeapons.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_MapTools: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_MapTools_Name";
|
||||
descriptionShort = "$STR_ACE_MapTools_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\maptool_item.paa);
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
93
addons/map/MapControls.hpp
Normal file
93
addons/map/MapControls.hpp
Normal file
@ -0,0 +1,93 @@
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ColorBlack: RscButton {
|
||||
idc = 36732;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {0,0,0,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlack""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorBlack")]);
|
||||
};
|
||||
class ColorRed: RscButton {
|
||||
idc = 36733;
|
||||
x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {1,0,0,1};
|
||||
colorFocused[] = {1,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorRed""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),QUOTE(ColorRed))]);
|
||||
};
|
||||
class ColorGreen: RscButton {
|
||||
idc = 36734;
|
||||
x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {0,1,0,1};
|
||||
colorFocused[] = {0,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorGreen""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorGreen")]);
|
||||
};
|
||||
class ColorBlue: RscButton {
|
||||
idc = 36735;
|
||||
x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.8,1};
|
||||
colorBackgroundActive[] = {0,0,1,1};
|
||||
colorFocused[] = {0,0,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlue""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorBlue")]);
|
||||
};
|
||||
class ColorYellow: RscButton {
|
||||
idc = 36736;
|
||||
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {1,1,0,1};
|
||||
colorFocused[] = {1,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorYellow""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorYellow")]);
|
||||
};
|
||||
class ColorWhite: RscButton {
|
||||
idc = 36737;
|
||||
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.8,1};
|
||||
colorBackgroundActive[] = {1,1,1,1};
|
||||
colorFocused[] = {1,1,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorWhite""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorWhite")]);
|
||||
};
|
||||
};
|
@ -13,13 +13,14 @@
|
||||
#define Y_gps safeZoneY + safeZoneH - 1.2 * H_gps
|
||||
|
||||
class RscTitles {
|
||||
class RscAGM_MapGps {
|
||||
class RscACE_MapGps {
|
||||
idd = 9855;
|
||||
movingEnable = 1;
|
||||
duration = 3600;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
onLoad = "uiNamespace setVariable ['AGM_Map_mapGpsDisplay', _this select 0];";
|
||||
// onLoad = QUOTE(uiNamespace setVariable [ARR_2(QGVAR(ui_mapGpsDisplay), _this select 0)];);
|
||||
onLoad = "uiNamespace setVariable ['ACE_map_ui_mapGpsDisplay', _this select 0];"; //@todo cbaify this
|
||||
//onUnLoad = "_this call onRscLoad";
|
||||
class controls {
|
||||
class back:RscPicture {
|
||||
@ -27,7 +28,7 @@ class RscTitles {
|
||||
y = Y_gps;
|
||||
w = W_gps;
|
||||
h = H_gps;
|
||||
text = "\AGM_Map\UI\mapGps.paa";
|
||||
text = PATHTOF(UI\mapGps.paa);
|
||||
colorBackground[] = {1, 1, 1, 1};
|
||||
};
|
||||
class heading: RscText{
|
71
addons/map/XEH_postInitClient.sqf
Normal file
71
addons/map/XEH_postInitClient.sqf
Normal file
@ -0,0 +1,71 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith{};
|
||||
|
||||
// Init variables
|
||||
GVAR(mapVisableLastFrame) = false;
|
||||
GVAR(mapGpsShow) = true;
|
||||
|
||||
GVAR(mapTool_Shown) = 0;
|
||||
GVAR(mapTool_pos) = [0,0];
|
||||
GVAR(mapTool_angle) = 0;
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
GVAR(drawing_tempLineMarker) = [];
|
||||
GVAR(drawing_lineMarkers) = [];
|
||||
GVAR(drawing_drawColor) = "ColorBlack";
|
||||
GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
|
||||
|
||||
//Probably need this spawn, because CBA_fnc_addPerFrameHandler doesn't work durring breifing.
|
||||
[] spawn {
|
||||
_fnc_installMapEvents = {
|
||||
_d = _this;
|
||||
diag_log format ["Installing EH in display %1", _d];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapToolMarkers);}];
|
||||
(finddisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}];
|
||||
};
|
||||
|
||||
// Wait until the briefing map is detected
|
||||
// display = 37 for SP
|
||||
// display = 52 for host server on MP;
|
||||
// display = 53 for MP clients)
|
||||
waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)};
|
||||
|
||||
if (isNull findDisplay 12) then {
|
||||
// Install event handlers on the map control of the briefing screen (control = 51)
|
||||
GVAR(drawing_syncMarkers) = true;
|
||||
if (!isNull findDisplay 52) then {
|
||||
52 call _fnc_installMapEvents;
|
||||
} else {
|
||||
if (!isNull findDisplay 53) then {
|
||||
53 call _fnc_installMapEvents;
|
||||
} else {
|
||||
37 call _fnc_installMapEvents;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Briefing screen was skipped; the player is JIP, create the markers defined during the briefing
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
{
|
||||
_x call FUNC(addLineMarker);
|
||||
} forEach GVAR(drawing_serverLineMarkers);
|
||||
};
|
||||
|
||||
// Wait until the main map display is detected (display = 12)
|
||||
waitUntil { !isNull findDisplay 12 };
|
||||
// Install event handlers on the map control and display (control = 51)
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
12 call _fnc_installMapEvents;
|
||||
|
||||
// Update the size and rotation of map tools
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
|
||||
[FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
31
addons/map/XEH_preInit.sqf
Normal file
31
addons/map/XEH_preInit.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
PREP(addLineMarker);
|
||||
PREP(blueForceTrackingModule);
|
||||
PREP(blueForceTrackingUpdate);
|
||||
PREP(calculateMapScale);
|
||||
PREP(cancelDrawing);
|
||||
PREP(canDraw);
|
||||
PREP(canUseMapTools);
|
||||
PREP(canUseMapGPS);
|
||||
PREP(copyMapReceiveMarkers);
|
||||
PREP(copyMapRemoteSend);
|
||||
PREP(copyMapStart);
|
||||
PREP(handleKeyDown);
|
||||
PREP(handleMouseButton);
|
||||
PREP(handleMouseMove);
|
||||
PREP(handleMouseZChanged);
|
||||
PREP(isInsideMapTool);
|
||||
PREP(mapStateUpdater);
|
||||
PREP(openMapGps);
|
||||
PREP(openMapGpsUpdate);
|
||||
PREP(removeLineMarker);
|
||||
PREP(updateMapToolMarkers);
|
||||
PREP(updateLineMarker);
|
||||
|
||||
//Add Event Handlers:
|
||||
["drawing_removeLineMarker", FUNC(removeLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_addLineMarker", FUNC(addLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
|
||||
["drawing_requestMarkers", FUNC(copyMapRemoteSend) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers) ] call EFUNC(common,addEventHandler);
|
6
addons/map/XEH_preInitServer.sqf
Normal file
6
addons/map/XEH_preInitServer.sqf
Normal file
@ -0,0 +1,6 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(drawing_serverLineMarkers) = [];
|
||||
publicVariable QGVAR(drawing_serverLineMarkers);
|
145
addons/map/config.cpp
Normal file
145
addons/map/config.cpp
Normal file
@ -0,0 +1,145 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_MapTools"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
author[] = {"KoffeinFlummi","CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
class RscControlsGroup;
|
||||
class RscActiveText;
|
||||
class RscPicture;
|
||||
class RscText;
|
||||
class RscObject;
|
||||
class RscButton;
|
||||
class RscButtonMenuOK;
|
||||
class RscButtonMenuCancel;
|
||||
class RscButtonMenu;
|
||||
class RscEdit;
|
||||
|
||||
class ACE_Parameters_Numeric {
|
||||
GVAR(BFT_Interval) = 1;
|
||||
};
|
||||
class ACE_Parameters_Boolean {
|
||||
GVAR(EveryoneCanDrawOnBriefing) = 1;
|
||||
GVAR(BFT_Enabled) = 0;
|
||||
GVAR(BFT_HideAiGroups) = 0;
|
||||
};
|
||||
|
||||
#include "MapGpsUI.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMarkers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
|
||||
class RscMapControl {
|
||||
sizeExGrid = 0.032;
|
||||
};
|
||||
|
||||
// REGULAR MAP
|
||||
class RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// DIARY
|
||||
class RscDisplayDiary {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// BRIEFING SCREEN
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
@ -13,10 +13,12 @@
|
||||
* Return
|
||||
*/
|
||||
|
||||
_name = _this select 0;
|
||||
_startPos = _this select 1;
|
||||
_difPos = (_this select 2) vectorDiff _startPos ;
|
||||
_color = _this select 3;
|
||||
#include "script_component.hpp"
|
||||
|
||||
_name = _this select 0;
|
||||
_startPos = _this select 1;
|
||||
_difPos = (_this select 2) vectorDiff _startPos ;
|
||||
_color = _this select 3;
|
||||
|
||||
_marker = createMarkerLocal [_name, _startPos];
|
||||
_name setMarkerShapeLocal "RECTANGLE";
|
||||
@ -32,9 +34,9 @@ if (_mag > 0) then {
|
||||
_name setMarkerDirLocal 0;
|
||||
};
|
||||
|
||||
AGM_Map_lineMarkers pushBack (+_this);
|
||||
GVAR(drawing_lineMarkers) pushBack (+_this);
|
||||
|
||||
if (isServer && AGM_Map_syncMarkers) then {
|
||||
AGM_Map_serverLineMarkers pushBack (+_this);
|
||||
publicVariable "AGM_Map_serverLineMarkers";
|
||||
if (isServer && GVAR(drawing_syncMarkers)) then {
|
||||
GVAR(drawing_serverLineMarkers) pushBack (+_this);
|
||||
publicVariable QGVAR(drawing_serverLineMarkers);
|
||||
};
|
32
addons/map/functions/fnc_blueForceTrackingModule.sqf
Normal file
32
addons/map/functions/fnc_blueForceTrackingModule.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
*
|
||||
* Initializes the blue force tracking module.
|
||||
*
|
||||
* Arguments:
|
||||
* Whatever the module provides. (I dunno.)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if !(hasInterface) exitWith {};
|
||||
|
||||
_logic = _this select 0;
|
||||
_units = _this select 1;
|
||||
_activated = _this select 2;
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
GVAR(BFT_Enabled) = true;
|
||||
[_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readNumericParameterFromModule);
|
||||
[_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readBooleanParameterFromModule);
|
||||
|
||||
diag_log text "[ACE]: Blue Force Tracking Module initialized.";
|
||||
TRACE_2("[ACE]: Blue Force Tracking Module initialized.",GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));
|
||||
|
||||
//start BFT:
|
||||
GVAR(BFT_markers) = [];
|
||||
[FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler;
|
38
addons/map/functions/fnc_blueForceTrackingUpdate.sqf
Normal file
38
addons/map/functions/fnc_blueForceTrackingUpdate.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Delete last set of markers (always)
|
||||
{
|
||||
deleteMarkerLocal _x;
|
||||
} forEach GVAR(BFT_markers);
|
||||
|
||||
|
||||
if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then {
|
||||
|
||||
_groupsToDrawMarkers = [];
|
||||
_playerSide = call EFUNC(common,playerSide);
|
||||
|
||||
if (GVAR(BFT_HideAiGroups)) then {
|
||||
_groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter);
|
||||
} else {
|
||||
_groupsToDrawMarkers = [allGroups, {
|
||||
_anyPlayers = {
|
||||
[_x] call EFUNC(common,isPlayer);
|
||||
} count units _this;
|
||||
(side _this == _playerSide) && _anyPlayers > 0
|
||||
}] call EFUNC(common,filter);
|
||||
};
|
||||
|
||||
|
||||
{
|
||||
_markerType = [_x] call EFUNC(common,getMarkerType);
|
||||
|
||||
_colour = format ["Color%1", side _x];
|
||||
|
||||
_marker = createMarkerLocal [format ["ACE_BFT_%1", _i], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
|
||||
_marker setMarkerTypeLocal _markerType;
|
||||
_marker setMarkerColorLocal _colour;
|
||||
_marker setMarkerTextLocal (groupID _x);
|
||||
|
||||
GVAR(BFT_markers) pushBack _marker;
|
||||
} forEach _groupsToDrawMarkers;
|
||||
};
|
@ -10,6 +10,8 @@
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_pos = ((finddisplay 12) displayctrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
||||
_screenOffset = ((finddisplay 12) displayctrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
|
||||
|
6
addons/map/functions/fnc_canDraw.sqf
Normal file
6
addons/map/functions/fnc_canDraw.sqf
Normal file
@ -0,0 +1,6 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
(missionNameSpace getVariable [QGVAR(drawing_syncMarkers), true] && {GVAR(EveryoneCanDrawOnBriefing)}) ||
|
||||
{(!isNull ACE_player) && {"ACE_MapTools" in items ACE_player}}
|
7
addons/map/functions/fnc_canUseMapGPS.sqf
Normal file
7
addons/map/functions/fnc_canUseMapGPS.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
visibleMap &&
|
||||
{alive ACE_player} &&
|
||||
{"ItemGPS" in (assignedItems ACE_player)}
|
10
addons/map/functions/fnc_canUseMapTools.sqf
Normal file
10
addons/map/functions/fnc_canUseMapTools.sqf
Normal file
@ -0,0 +1,10 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
visibleMap &&
|
||||
{alive player} &&
|
||||
{"ItemMap" in (assignedItems ACE_player)} &&
|
||||
{"ACE_MapTools" in (items ACE_player)} &&
|
||||
{!GVAR(mapTool_isDragging)} &&
|
||||
{!GVAR(mapTool_isRotating)}
|
19
addons/map/functions/fnc_cancelDrawing.sqf
Normal file
19
addons/map/functions/fnc_cancelDrawing.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Cancel the drawing of the current line marker
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
if (count GVAR(drawing_tempLineMarker) > 0) then {
|
||||
deleteMarkerLocal (GVAR(drawing_tempLineMarker) select 0);
|
||||
};
|
||||
GVAR(drawing_tempLineMarker) = [];
|
23
addons/map/functions/fnc_copyMapReceiveMarkers.sqf
Normal file
23
addons/map/functions/fnc_copyMapReceiveMarkers.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Copy recieved markers to map
|
||||
*
|
||||
* Argument:
|
||||
* 0: Array of markers to copy (Array)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_lineMarkers);
|
||||
|
||||
{
|
||||
_marker = _x;
|
||||
//Add marker if we don't already have it
|
||||
if (({(_x select 0) == (_marker select 0)} count GVAR(drawing_lineMarkers)) == 0) then {
|
||||
_marker call FUNC(addLineMarker);
|
||||
};
|
||||
} forEach _lineMarkers;
|
17
addons/map/functions/fnc_copyMapRemoteSend.sqf
Normal file
17
addons/map/functions/fnc_copyMapRemoteSend.sqf
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Send Map markers to other player
|
||||
*
|
||||
* Argument:
|
||||
* 0: Target player (Unit)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_requester);
|
||||
|
||||
["drawing_sendbackMarkers", _requester, [GVAR(drawing_lineMarkers)]] call EFUNC(common,targetEvent);
|
23
addons/map/functions/fnc_copyMapStart.sqf
Normal file
23
addons/map/functions/fnc_copyMapStart.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Send request to remote player
|
||||
*
|
||||
* Argument:
|
||||
* 0: Player (Unit)
|
||||
* 0: Target player (Unit)
|
||||
*
|
||||
* Code Chain:
|
||||
* START: copyMapStart: triggers event drawing_requestMarkers on remote
|
||||
* handeled by: copyMapRemoteSend: triggers event "drawing_sendbackMarkers" on origin
|
||||
* handeled by: copyMapReceiveMarkers
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_player,_target);
|
||||
|
||||
["drawing_requestMarkers", _target, [_player]] call EFUNC(common,targetEvent);
|
@ -14,6 +14,8 @@
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_display = _this select 0;
|
||||
@ -28,21 +30,21 @@ _handled = false;
|
||||
|
||||
// If pressed Esc while drawing
|
||||
if (_code == DIK_ESCAPE) exitWith {
|
||||
if (AGM_Map_drawing) then {
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
if (GVAR(drawing_isDrawing)) then {
|
||||
call FUNC(cancelDrawing);
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_code == DIK_DELETE) exitWith {
|
||||
if (AGM_Map_drawing) then {
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
if (GVAR(drawing_isDrawing)) then {
|
||||
call FUNC(cancelDrawing);
|
||||
_handled = true;
|
||||
} else {
|
||||
|
||||
// Check if a line marker needs to be deleted
|
||||
{
|
||||
_relPos = AGM_Map_mousePos vectorDiff (_x select 1);
|
||||
_relPos = GVAR(mousePosition) vectorDiff (_x select 1);
|
||||
_diffVector = (_x select 2) vectorDiff (_x select 1);
|
||||
_magDiffVector = vectorMagnitude _diffVector;
|
||||
if (_magDiffVector == 0) then {
|
||||
@ -57,16 +59,15 @@ if (_code == DIK_DELETE) exitWith {
|
||||
_lambdaTrasAbs = vectorMagnitude (_relPos vectorDiff (_diffVector vectorMultiply _lambdaLong));
|
||||
if (_lambdaLong >= 0 && _lambdaLong <= _magDiffVector && _lambdaTrasAbs <= 5) exitWith {
|
||||
// Delete the line marker
|
||||
if (AGM_Map_syncMarkers) then {
|
||||
[[_x select 0], "AGM_Map_fnc_removeLineMarker", 2] call AGM_Core_fnc_execRemoteFnc;
|
||||
if (GVAR(drawing_syncMarkers)) then {
|
||||
["drawing_removeLineMarker", [_x select 0]] call EFUNC(common,globalEvent);
|
||||
} else {
|
||||
deleteMarkerLocal (_x select 0);
|
||||
AGM_Map_lineMarkers = AGM_Map_lineMarkers - [_x];
|
||||
GVAR(drawing_lineMarkers) = GVAR(drawing_lineMarkers) - [_x];
|
||||
};
|
||||
_handled = true;
|
||||
|
||||
};
|
||||
} forEach AGM_Map_lineMarkers;
|
||||
} forEach GVAR(drawing_lineMarkers);
|
||||
};
|
||||
};
|
||||
|
102
addons/map/functions/fnc_handleMouseButton.sqf
Normal file
102
addons/map/functions/fnc_handleMouseButton.sqf
Normal file
@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse buttons.
|
||||
*
|
||||
* Argument:
|
||||
* 0: 1 if mouse down down, 0 if mouse button up (Number)
|
||||
* 1: Parameters of the mouse button event
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_dir = _this select 0;
|
||||
_params = _this select 1;
|
||||
_control = _params select 0;
|
||||
_button = _params select 1;
|
||||
_screenPos = [_params select 2, _params select 3];
|
||||
_shiftKey = _params select 4;
|
||||
_ctrlKey = _params select 5;
|
||||
_altKey = _params select 6;
|
||||
_handled = false;
|
||||
|
||||
|
||||
// If it's not a left button event, exit
|
||||
if (_button != 0) exitWith {};
|
||||
|
||||
// If releasing
|
||||
if (_dir != 1 && (GVAR(mapTool_isDragging) or GVAR(mapTool_isRotating))) exitWith {
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
_handled = true;
|
||||
_handled
|
||||
};
|
||||
|
||||
// If clicking
|
||||
if (_dir == 1) exitWith {
|
||||
|
||||
if !(call FUNC(canDraw)) exitWith {_handled = false;};
|
||||
|
||||
// Transform mouse screen position to coordinates
|
||||
_pos = _control ctrlMapScreenToWorld _screenPos;
|
||||
_pos set [count _pos, 0];
|
||||
|
||||
if (GVAR(drawing_isDrawing)) exitWith {
|
||||
// Already drawing -> Add tempLineMarker to permanent list
|
||||
if (GVAR(drawing_syncMarkers)) then {
|
||||
deleteMarkerLocal (GVAR(drawing_tempLineMarker) select 0);
|
||||
// [GVAR(drawing_tempLineMarker), "FUNC(addLineMarker)", 2] call EFUNC(common,execRemoteFnc);
|
||||
["drawing_addLineMarker", GVAR(drawing_tempLineMarker)] call EFUNC(common,globalEvent);
|
||||
// Log who drew on the briefing screen
|
||||
(text format ["[ACE] Server: Player %1 drew on the briefing screen", name player]) call EFUNC(common,serverLog);
|
||||
} else {
|
||||
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
||||
GVAR(drawing_lineMarkers) pushBack (+GVAR(drawing_tempLineMarker));
|
||||
};
|
||||
GVAR(drawing_tempLineMarker) = [];
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
if (_altKey) exitWith {
|
||||
// Start drawing
|
||||
GVAR(drawing_isDrawing) = true;
|
||||
// Create tempLineMarker
|
||||
_gui = format ["%1%2%3%4", random (100), random (100), random (100), random (100)];
|
||||
GVAR(drawing_tempLineMarker) = [_gui, + _pos, + _pos, GVAR(drawing_drawColor)];
|
||||
_marker = createMarkerLocal [_gui, [0,0]];
|
||||
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
|
||||
// If no map tool marker then exit
|
||||
if (isNil QGVAR(mapTool_markerRotatingFixed)) exitWith {_handled = false;};
|
||||
|
||||
// Check if clicking the maptool
|
||||
if (_pos call FUNC(isInsideMapTool)) exitWith {
|
||||
// Store data for dragging
|
||||
GVAR(mapTool_startPos) = + GVAR(mapTool_pos);
|
||||
GVAR(mapTool_startDragPos) = + _pos;
|
||||
if (_ctrlKey) then {
|
||||
// Store data for rotating
|
||||
GVAR(mapTool_startAngle) = + GVAR(mapTool_angle);
|
||||
GVAR(mapTool_startDragAngle) = (180 + ((GVAR(mapTool_startDragPos) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mapTool_startDragPos) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
|
||||
// Start rotating
|
||||
GVAR(mapTool_isRotating) = true;
|
||||
} else {
|
||||
// Start dragging
|
||||
GVAR(mapTool_isDragging) = true;
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
|
||||
_handled
|
63
addons/map/functions/fnc_handleMouseMove.sqf
Normal file
63
addons/map/functions/fnc_handleMouseMove.sqf
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse movement over the map tool.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Map Control
|
||||
* 1: Mouse position on screen coordinates
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_control", "_pos"];
|
||||
|
||||
_control = _this select 0;
|
||||
_pos = [_this select 1, _this select 2];
|
||||
GVAR(mousePosition) = _control ctrlMapScreenToWorld _pos;
|
||||
GVAR(mousePosition) set [2, 0]; //convert 2d pos to 3d
|
||||
|
||||
// If cannot draw then exit
|
||||
if !(call FUNC(canDraw)) exitWith {
|
||||
// If was drawing, cancel
|
||||
if (GVAR(drawing_isDrawing)) then {
|
||||
call FUNC(cancelDrawing);
|
||||
};
|
||||
false
|
||||
};
|
||||
|
||||
// Handle drawing
|
||||
if (GVAR(drawing_isDrawing)) exitWith {
|
||||
GVAR(drawing_tempLineMarker) set [2, GVAR(mousePosition)];
|
||||
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
||||
false
|
||||
};
|
||||
|
||||
// Handle Map tools
|
||||
if (isNil QGVAR(mapTool_markerRotatingFixed)) exitWith {false};
|
||||
|
||||
// Translation
|
||||
if (GVAR(mapTool_isDragging)) exitWith {
|
||||
GVAR(mapTool_pos) set [0, (GVAR(mapTool_startPos) select 0) + (GVAR(mousePosition) select 0) - (GVAR(mapTool_startDragPos) select 0)];
|
||||
GVAR(mapTool_pos) set [1, (GVAR(mapTool_startPos) select 1) + (GVAR(mousePosition) select 1) - (GVAR(mapTool_startDragPos) select 1)];
|
||||
|
||||
// Update the size and rotation of the maptool
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
true
|
||||
};
|
||||
|
||||
// Rotation
|
||||
if (GVAR(mapTool_isRotating)) exitWith {
|
||||
// Get new angle
|
||||
_angle = (180 + ((GVAR(mousePosition) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mousePosition) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
|
||||
GVAR(mapTool_angle) = GVAR(mapTool_startAngle) + _angle - GVAR(mapTool_startDragAngle);
|
||||
|
||||
// Update the size and rotation of the maptool
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
true
|
||||
};
|
||||
|
||||
false
|
43
addons/map/functions/fnc_handleMouseZChanged.sqf
Normal file
43
addons/map/functions/fnc_handleMouseZChanged.sqf
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse wheel.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Control
|
||||
* 1: Scroll Amount
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_control = _this select 0;
|
||||
_dir = _this select 1;
|
||||
diag_log "Scroll";
|
||||
diag_log _this;
|
||||
_handled = false;
|
||||
|
||||
// If drawing, change line color
|
||||
|
||||
|
||||
//@todo AGM bug:
|
||||
// ACE_Map_drawColors is never defined
|
||||
|
||||
/* if (count GVAR(drawing_tempLineMarker) > 0) then {
|
||||
ACE_Map_drawColor = if (_dir > 0) then {ACE_Map_drawColor + 1} else {ACE_Map_drawColor - 1};
|
||||
if (ACE_Map_drawColor >= count ACE_Map_drawColors) then {
|
||||
ACE_Map_drawColor = ACE_Map_drawColor - count ACE_Map_drawColors;
|
||||
};
|
||||
if (ACE_Map_drawColor < 0) then {
|
||||
ACE_Map_drawColor = ACE_Map_drawColor + count ACE_Map_drawColors;
|
||||
};
|
||||
GVAR(drawing_tempLineMarker) set [3, ACE_Map_drawColor];
|
||||
GVAR(drawing_tempLineMarker) call ACE_Map_fnc_updateLineMarker;
|
||||
|
||||
_handled = true;
|
||||
}; */
|
||||
_handled
|
@ -11,17 +11,19 @@
|
||||
* Boolean
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define TEXTURE_WIDTH_IN_M 6205
|
||||
#define DIST_BOTTOM_TO_CENTER_PERC -0.33
|
||||
#define DIST_TOP_TO_CENTER_PERC 0.65
|
||||
#define DIST_LEFT_TO_CENTER_PERC 0.30
|
||||
|
||||
if (AGM_Map_mapToolsShown == 0) exitWith {false};
|
||||
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (AGM_Map_mapToolsShown - 1);
|
||||
if (GVAR(mapTool_Shown) == 0) exitWith {false};
|
||||
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1);
|
||||
|
||||
_pos = [_this select 0, _this select 1, 0];
|
||||
_relPos = _pos vectorDiff [AGM_Map_pos select 0, AGM_Map_pos select 1, 0];
|
||||
_dirVector = [sin(AGM_Map_angle), cos(AGM_Map_angle), 0];
|
||||
_relPos = _pos vectorDiff [GVAR(mapTool_pos) select 0, GVAR(mapTool_pos) select 1, 0];
|
||||
_dirVector = [sin(GVAR(mapTool_angle)), cos(GVAR(mapTool_angle)), 0];
|
||||
|
||||
// Projection of the relative position over the longitudinal axis of the map tool
|
||||
_lambdaLong = _dirVector vectorDotProduct _relPos;
|
40
addons/map/functions/fnc_mapStateUpdater.sqf
Normal file
40
addons/map/functions/fnc_mapStateUpdater.sqf
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (visibleMap) then {
|
||||
// Show/Hide draw buttons
|
||||
if ("ACE_MapTools" in items ACE_player) then {
|
||||
{ ((finddisplay 12) displayctrl _x) ctrlShow true; } forEach GVAR(drawing_controls);
|
||||
} else {
|
||||
{ ((finddisplay 12) displayctrl _x) ctrlShow false; } forEach GVAR(drawing_controls);
|
||||
if (GVAR(drawing_isDrawing)) then {
|
||||
call FUNC(cancelDrawing);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//When Map is Closed:
|
||||
if (GVAR(mapVisableLastFrame) && (!visibleMap)) then {
|
||||
GVAR(mapVisableLastFrame) = false;
|
||||
// Hide GPS
|
||||
[false] call FUNC(openMapGps);
|
||||
// Hide Map tools
|
||||
deleteMarkerLocal MARKERNAME_MAPTOOL_FIXED;
|
||||
deleteMarkerLocal MARKERNAME_MAPTOOL_ROTATINGNORMAL;
|
||||
deleteMarkerLocal MARKERNAME_MAPTOOL_ROTATINGSMALL;
|
||||
GVAR(mapTool_markerRotatingFixed) = nil;
|
||||
GVAR(mapTool_markerRotatingNormal) = nil;
|
||||
GVAR(mapTool_markerRotatingSmall) = nil;
|
||||
// Cancel drawing
|
||||
call FUNC(cancelDrawing);
|
||||
};
|
||||
|
||||
//When Map is Opened:
|
||||
if ((!GVAR(mapVisableLastFrame)) && (visibleMap)) then {
|
||||
//todo: "mapOpened" Event????
|
||||
GVAR(mapVisableLastFrame) = true;
|
||||
// Show and update map tools if required
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
// Show GPS if required
|
||||
[GVAR(mapGpsShow)] call FUNC(openMapGps);
|
||||
};
|
25
addons/map/functions/fnc_openMapGps.sqf
Normal file
25
addons/map/functions/fnc_openMapGps.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Opens or closes the gps on the map screen, showing coordinates
|
||||
*
|
||||
* Argument:
|
||||
* 0: Open GPS? (Boolean)
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_shouldOpenGps = _this select 0;
|
||||
_isOpen = !(isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull]));
|
||||
|
||||
if (_shouldOpenGps && {"ItemGPS" in assignedItems ACE_player} && {!_isOpen}) then {
|
||||
("RscACE_MapGps" call BIS_fnc_rscLayer) cutRsc ["RscACE_MapGps","PLAIN"];
|
||||
|
||||
[FUNC(openMapGpsUpdate), 0.5, []] call CBA_fnc_addPerFrameHandler; //update bearing/altitude every 0.5 sec (ticktime)
|
||||
} else {
|
||||
("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||
};
|
||||
|
18
addons/map/functions/fnc_openMapGpsUpdate.sqf
Normal file
18
addons/map/functions/fnc_openMapGpsUpdate.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
//CAA-Picard
|
||||
//update gps display
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if ((!("ItemGPS" in assigneditems ACE_player)) || {isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull])}) exitWith {
|
||||
("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; //close GPS RSC
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler; //remove frameHandler
|
||||
};
|
||||
disableSerialization;
|
||||
|
||||
_mapGpsDisplay = uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull];
|
||||
_ctrl = _mapGpsDisplay displayCtrl 913590;
|
||||
_ctrl ctrlSetText str(round(getDir player)); //set Heading
|
||||
_ctrl = _mapGpsDisplay displayCtrl 913591;
|
||||
_ctrl ctrlSetText str(round((getPosASL player) select 2)); //set Altitude
|
||||
_ctrl = _mapGpsDisplay displayCtrl 913592;
|
||||
_ctrl ctrlSetText mapGridPosition player; //set grid cords
|
31
addons/map/functions/fnc_removeLineMarker.sqf
Normal file
31
addons/map/functions/fnc_removeLineMarker.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Remove the line marker
|
||||
*
|
||||
* Argument:
|
||||
* 0: Marker Name (string)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_name = _this select 0;
|
||||
|
||||
deleteMarkerLocal _name;
|
||||
{
|
||||
if ((_x select 0) == _name) exitWith {
|
||||
GVAR(drawing_lineMarkers) = GVAR(drawing_lineMarkers) - [_x];
|
||||
};
|
||||
} forEach GVAR(drawing_lineMarkers);
|
||||
|
||||
if (isServer && GVAR(drawing_syncMarkers)) then {
|
||||
{
|
||||
if ((_x select 0) == _name) exitWith {
|
||||
GVAR(drawing_serverLineMarkers) = GVAR(drawing_serverLineMarkers) - [_x];
|
||||
publicVariable QGVAR(drawing_serverLineMarkers);
|
||||
};
|
||||
} forEach GVAR(drawing_serverLineMarkers);
|
||||
};
|
@ -13,6 +13,8 @@
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_name = _this select 0;
|
||||
_startPos = _this select 1;
|
||||
_difPos = (_this select 2) vectorDiff _startPos ;
|
||||
@ -20,7 +22,7 @@
|
||||
|
||||
_name setMarkerShapeLocal "RECTANGLE";
|
||||
_name setMarkerAlphaLocal 1;
|
||||
_name setMarkerColorLocal AGM_Map_drawColor;
|
||||
_name setMarkerColorLocal GVAR(drawing_drawColor);
|
||||
_name setMarkerPosLocal (_startPos vectorAdd (_difPos vectorMultiply 0.5));
|
||||
_mag = vectorMagnitude _difPos;
|
||||
if (_mag > 0) then {
|
73
addons/map/functions/fnc_updateMapToolMarkers.sqf
Normal file
73
addons/map/functions/fnc_updateMapToolMarkers.sqf
Normal file
@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Update the map tool markers, position, size, rotation and visibility.
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define TEXTURE_WIDTH_IN_M 6205
|
||||
#define CENTER_OFFSET_Y_PERC 0.1606
|
||||
#define CONSTANT_SCALE 0.2
|
||||
|
||||
// If markers exist and they should'nt, delete them
|
||||
if (!("ACE_MapTools" in items ACE_player) || {GVAR(mapTool_Shown) == 0}) then {
|
||||
// If markers exist, delete them
|
||||
if (!isNil QGVAR(mapTool_markerRotatingFixed)) then {
|
||||
deleteMarkerLocal MARKERNAME_MAPTOOL_FIXED;
|
||||
GVAR(mapTool_markerRotatingFixed) = nil;
|
||||
};
|
||||
};
|
||||
if (!("ACE_MapTools" in items ACE_player) || {GVAR(mapTool_Shown) != 1}) then {
|
||||
if (!isNil QGVAR(mapTool_markerRotatingNormal)) then {
|
||||
deleteMarkerLocal MARKERNAME_MAPTOOL_ROTATINGNORMAL;
|
||||
GVAR(mapTool_markerRotatingNormal) = nil;
|
||||
};
|
||||
};
|
||||
if (!("ACE_MapTools" in items ACE_player) || {GVAR(mapTool_Shown) != 2}) then {
|
||||
if (!isNil QGVAR(mapTool_markerRotatingSmall)) then {
|
||||
deleteMarkerLocal MARKERNAME_MAPTOOL_ROTATINGSMALL;
|
||||
GVAR(mapTool_markerRotatingSmall) = nil;
|
||||
};
|
||||
};
|
||||
|
||||
if (!("ACE_MapTools" in items ACE_player)|| {GVAR(mapTool_Shown) == 0}) exitWith {};
|
||||
|
||||
// If markers don't exist and should, create them
|
||||
if (isNil QGVAR(mapTool_markerRotatingFixed)) then {
|
||||
GVAR(mapTool_markerRotatingFixed) = createMarkerLocal [MARKERNAME_MAPTOOL_FIXED, GVAR(mapTool_pos)];
|
||||
MARKERNAME_MAPTOOL_FIXED setMarkerType MARKERNAME_MAPTOOL_FIXED;
|
||||
};
|
||||
if ((isNil QGVAR(mapTool_markerRotatingNormal)) && {GVAR(mapTool_Shown) == 1}) then {
|
||||
GVAR(mapTool_markerRotatingNormal) = createMarkerLocal [MARKERNAME_MAPTOOL_ROTATINGNORMAL, GVAR(mapTool_pos)];
|
||||
MARKERNAME_MAPTOOL_ROTATINGNORMAL setMarkerType MARKERNAME_MAPTOOL_ROTATINGNORMAL;
|
||||
};
|
||||
if ((isNil QGVAR(mapTool_markerRotatingSmall)) && {GVAR(mapTool_Shown) == 2}) then {
|
||||
GVAR(mapTool_markerRotatingSmall) = createMarkerLocal [MARKERNAME_MAPTOOL_ROTATINGSMALL, GVAR(mapTool_pos)];
|
||||
MARKERNAME_MAPTOOL_ROTATINGSMALL setMarkerType MARKERNAME_MAPTOOL_ROTATINGSMALL;
|
||||
};
|
||||
|
||||
_rotatingMarker = [MARKERNAME_MAPTOOL_ROTATINGNORMAL, MARKERNAME_MAPTOOL_ROTATINGSMALL] select (GVAR(mapTool_Shown) - 1);
|
||||
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1);
|
||||
|
||||
// Update scale of both parts
|
||||
_scale = _textureWidth * CONSTANT_SCALE * (call FUNC(calculateMapScale));
|
||||
MARKERNAME_MAPTOOL_FIXED setMarkerSizeLocal [_scale,_scale];
|
||||
_rotatingMarker setMarkerSizeLocal [_scale,_scale];
|
||||
|
||||
// Position of the fixed part
|
||||
_xPos = GVAR(mapTool_pos) select 0;
|
||||
_yPos = (GVAR(mapTool_pos) select 1) + _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||
MARKERNAME_MAPTOOL_FIXED setMarkerPosLocal [_xPos,_yPos];
|
||||
|
||||
// Position and rotation of the rotating part
|
||||
_xPos = (GVAR(mapTool_pos) select 0) + sin(GVAR(mapTool_angle)) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||
_yPos = (GVAR(mapTool_pos) select 1) + cos(GVAR(mapTool_angle)) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||
_rotatingMarker setMarkerPosLocal [_xPos,_yPos];
|
||||
_rotatingMarker setMarkerDirLocal GVAR(mapTool_angle);
|
1
addons/map/functions/script_component.hpp
Normal file
1
addons/map/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\map\script_component.hpp"
|
17
addons/map/script_component.hpp
Normal file
17
addons/map/script_component.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#define COMPONENT map
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_MAP
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_MAP
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAP
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
||||
|
||||
|
||||
#define MARKERNAME_MAPTOOL_FIXED "ACE_MapToolFixed"
|
||||
#define MARKERNAME_MAPTOOL_ROTATINGNORMAL "ACE_MapToolRotatingNormal"
|
||||
#define MARKERNAME_MAPTOOL_ROTATINGSMALL "ACE_MapToolRotatingSmall"
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-22 -->
|
||||
<Project name="AGM">
|
||||
<Project name="ACE">
|
||||
<Package name="Map">
|
||||
<Key ID="STR_AGM_MapTools_Name">
|
||||
<Key ID="STR_ACE_MapTools_Name">
|
||||
<English>Map Tools</English>
|
||||
<Spanish>Herramientas de mapa</Spanish>
|
||||
<French>Outils de navigation</French>
|
||||
@ -14,7 +14,7 @@
|
||||
<Hungarian>Térképészeti eszközök</Hungarian>
|
||||
<Russian>Инструменты карты</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_MapTools_Description">
|
||||
<Key ID="STR_ACE_MapTools_Description">
|
||||
<English>The Map Tools allow you to measure distances and angles on the map.</English>
|
||||
<Spanish>Las herramientas de mapa permiten medir distancias y ángulos en el mapa.</Spanish>
|
||||
<French>Les outils de navigation permettent de mesurer des distances et des angles sur la carte.</French>
|
||||
@ -26,7 +26,7 @@
|
||||
<Hungarian>A térképészeti eszközökkel távolságokat és szögeket tud mérni a térképen.</Hungarian>
|
||||
<Russian>Картографические инструменты позволяют измерять расстояния и углы на карте.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_MapTools_Menu">
|
||||
<Key ID="STR_ACE_Map_MapTools_Menu">
|
||||
<English>Map Tools >></English>
|
||||
<Spanish>Herramientas de mapa >></Spanish>
|
||||
<French>Outils de navigation >></French>
|
||||
@ -38,7 +38,7 @@
|
||||
<Hungarian>Térképészeti eszközök >></Hungarian>
|
||||
<Russian>Инструменты карты >></Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_MapToolsHide">
|
||||
<Key ID="STR_ACE_Map_MapToolsHide">
|
||||
<English>Hide Map Tool</English>
|
||||
<German>Verstecke Kartenwerkzeug</German>
|
||||
<Spanish>Ocultar herr. de mapa</Spanish>
|
||||
@ -50,7 +50,7 @@
|
||||
<Czech>Schovat pomůcku k mapě</Czech>
|
||||
<Russian>Скрыть инструменты</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_MapToolsShowNormal">
|
||||
<Key ID="STR_ACE_Map_MapToolsShowNormal">
|
||||
<English>Show Normal Map Tool</English>
|
||||
<German>Zeige Kartenwerkzeug (normal)</German>
|
||||
<Spanish>Mostrar herr. de mapa normal</Spanish>
|
||||
@ -62,7 +62,7 @@
|
||||
<Czech>Zobrazit normální pomůcku k mapě</Czech>
|
||||
<Russian>Показать инструменты (средн. размер)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_MapToolsShowSmall">
|
||||
<Key ID="STR_ACE_Map_MapToolsShowSmall">
|
||||
<English>Show Small Map Tool</English>
|
||||
<German>Zeige Kartenwerkzeug (klein)</German>
|
||||
<Spanish>Mostrar herr. de mapa pequeñas</Spanish>
|
||||
@ -74,7 +74,7 @@
|
||||
<Czech>Zobrazit malou pomůcku k mapě</Czech>
|
||||
<Russian>Показать инструменты (малый размер)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_MapToolsAlignNorth">
|
||||
<Key ID="STR_ACE_Map_MapToolsAlignNorth">
|
||||
<English>Align Map Tool to North</English>
|
||||
<German>Kartenwerkzeug nach Norden ausrichten</German>
|
||||
<Spanish>Alinear herr. de mapa al norte</Spanish>
|
||||
@ -86,7 +86,7 @@
|
||||
<Czech>Srovnat pomůcku k mapě na sever</Czech>
|
||||
<Russian>Выровнять инструменты на север</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_MapToolsAlignCompass">
|
||||
<Key ID="STR_ACE_Map_MapToolsAlignCompass">
|
||||
<English>Align Map Tool to Compass</English>
|
||||
<German>Kartenwerkzeug am Kompass ausrichten</German>
|
||||
<Spanish>Alinear herr. de mapa a la brújula</Spanish>
|
||||
@ -98,7 +98,7 @@
|
||||
<Czech>Srovnat pomůcku k mapě ke kompasu</Czech>
|
||||
<Russian>Выровнять инструменты по компасу</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_MapGpsShow">
|
||||
<Key ID="STR_ACE_Map_MapGpsShow">
|
||||
<English>Show GPS on Map</English>
|
||||
<German>Zeige GPS auf der Karte</German>
|
||||
<Spanish>Mostrar el GPS sobre el mapa</Spanish>
|
||||
@ -110,7 +110,7 @@
|
||||
<Czech>Zobrazit GPS na mapě</Czech>
|
||||
<Russian>Показать GPS на карте</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_MapGpsHide">
|
||||
<Key ID="STR_ACE_Map_MapGpsHide">
|
||||
<English>Hide GPS on Map</English>
|
||||
<German>Verstecke GPS auf der Karte</German>
|
||||
<Spanish>Ocultar el GPS del mapa</Spanish>
|
||||
@ -122,7 +122,7 @@
|
||||
<Czech>Schovat GPS na mapě</Czech>
|
||||
<Russian>Скрыть GPS на карте</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_CopyMap">
|
||||
<Key ID="STR_ACE_Map_CopyMap">
|
||||
<English>Copy Map</English>
|
||||
<German>Karte kopieren</German>
|
||||
<Spanish>Copiar mapa</Spanish>
|
||||
@ -134,7 +134,7 @@
|
||||
<Hungarian>Térkép másolása</Hungarian>
|
||||
<Portuguese>Copiar Mapa</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Map_MarkerDirection">
|
||||
<Key ID="STR_ACE_Map_MarkerDirection">
|
||||
<English>Direction: %1°</English>
|
||||
<German>Drehung: %1°</German>
|
||||
<French>Direction: %1°</French>
|
Loading…
Reference in New Issue
Block a user