More progress

This commit is contained in:
PabstMirror 2015-01-15 22:30:04 -06:00
parent b12844f175
commit 4c5912e2f1
7 changed files with 29 additions and 28 deletions

View File

@ -43,7 +43,7 @@ class CfgMarkers {
class ACE_MapToolFixed { class ACE_MapToolFixed {
name = "MapToolFixed"; name = "MapToolFixed";
icon = PATHTOF(\data\mapToolFixed.paa); icon = PATHTOF(data\mapToolFixed.paa);
scope = 0; scope = 0;
color[] = {1,1,1,1}; color[] = {1,1,1,1};
size = 32; size = 32;
@ -51,7 +51,7 @@ class CfgMarkers {
class ACE_MapToolRotatingNormal { class ACE_MapToolRotatingNormal {
name = "MapToolRotating"; name = "MapToolRotating";
icon = PATHTOF(\data\mapToolRotatingNormal.paa); icon = PATHTOF(data\mapToolRotatingNormal.paa);
scope = 0; scope = 0;
color[] = {1,1,1,1}; color[] = {1,1,1,1};
size = 32; size = 32;
@ -59,7 +59,7 @@ class CfgMarkers {
class ACE_MapToolRotatingSmall { class ACE_MapToolRotatingSmall {
name = "MapToolRotating"; name = "MapToolRotating";
icon = PATHTOF(\data\mapToolRotatingSmall.paa); icon = PATHTOF(data\mapToolRotatingSmall.paa);
scope = 0; scope = 0;
color[] = {1,1,1,1}; color[] = {1,1,1,1};
size = 32; size = 32;

View File

@ -132,13 +132,13 @@ class CfgVehicles {
class Module_F; class Module_F;
class ACE_ModuleBlueForceTracking: Module_F { class ACE_ModuleBlueForceTracking: Module_F {
author = "ACE Team"; author = "$STR_ACE_Common_ACETeam";
category = "ACE"; category = "ACE";
displayName = "Blue Force Tracking"; displayName = "Blue Force Tracking";
function = "ACE_Map_fnc_blueForceTracking"; function = "ACE_Map_fnc_blueForceTracking";
scope = 2; scope = 2;
isGlobal = 1; isGlobal = 1;
icon = "\ACE_Map\UI\IconBFTracking_ca.paa"; icon = PATHTOF(UI\IconBFTracking_ca.paa);
class Arguments { class Arguments {
class Interval { class Interval {
displayName = "Interval"; displayName = "Interval";

View File

@ -6,7 +6,7 @@ class CfgWeapons {
displayName = "$STR_ACE_MapTools_Name"; displayName = "$STR_ACE_MapTools_Name";
descriptionShort = "$STR_ACE_MapTools_Description"; descriptionShort = "$STR_ACE_MapTools_Description";
model = "\A3\weapons_F\ammo\mag_univ.p3d"; model = "\A3\weapons_F\ammo\mag_univ.p3d";
picture = PATHTOF(\UI\maptool_item.paa); picture = PATHTOF(UI\maptool_item.paa);
scope = 2; scope = 2;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {
mass = 1; mass = 1;

View File

@ -27,7 +27,8 @@ class controls {
colorBackground[] = {0.2,0.2,0.2,1}; colorBackground[] = {0.2,0.2,0.2,1};
colorBackgroundActive[] = {0,0,0,1}; colorBackgroundActive[] = {0,0,0,1};
colorFocused[] = {0,0,0,1}; colorFocused[] = {0,0,0,1};
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorBlack")]); onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlack""]";
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorBlack")]);
}; };
class ColorRed: RscButton { class ColorRed: RscButton {
idc = 36733; idc = 36733;
@ -38,8 +39,8 @@ class controls {
colorBackground[] = {0.8,0.2,0.2,1}; colorBackground[] = {0.8,0.2,0.2,1};
colorBackgroundActive[] = {1,0,0,1}; colorBackgroundActive[] = {1,0,0,1};
colorFocused[] = {1,0,0,1}; colorFocused[] = {1,0,0,1};
// onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorRed""]"; onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorRed""]";
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorRed")]); // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),QUOTE(ColorRed))]);
}; };
class ColorGreen: RscButton { class ColorGreen: RscButton {
idc = 36734; idc = 36734;
@ -50,8 +51,8 @@ class controls {
colorBackground[] = {0.2,0.8,0.2,1}; colorBackground[] = {0.2,0.8,0.2,1};
colorBackgroundActive[] = {0,1,0,1}; colorBackgroundActive[] = {0,1,0,1};
colorFocused[] = {0,1,0,1}; colorFocused[] = {0,1,0,1};
// onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorGreen""]"; onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorGreen""]";
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorGreen")]); // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorGreen")]);
}; };
class ColorBlue: RscButton { class ColorBlue: RscButton {
idc = 36735; idc = 36735;
@ -62,8 +63,8 @@ class controls {
colorBackground[] = {0.2,0.2,0.8,1}; colorBackground[] = {0.2,0.2,0.8,1};
colorBackgroundActive[] = {0,0,1,1}; colorBackgroundActive[] = {0,0,1,1};
colorFocused[] = {0,0,1,1}; colorFocused[] = {0,0,1,1};
// onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorBlue""]"; onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlue""]";
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorBlue")]); // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorBlue")]);
}; };
class ColorYellow: RscButton { class ColorYellow: RscButton {
idc = 36736; idc = 36736;
@ -74,8 +75,8 @@ class controls {
colorBackground[] = {0.8,0.8,0.2,1}; colorBackground[] = {0.8,0.8,0.2,1};
colorBackgroundActive[] = {1,1,0,1}; colorBackgroundActive[] = {1,1,0,1};
colorFocused[] = {1,1,0,1}; colorFocused[] = {1,1,0,1};
// onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorYellow""]"; onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorYellow""]";
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorYellow")]); // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorYellow")]);
}; };
class ColorWhite: RscButton { class ColorWhite: RscButton {
idc = 36737; idc = 36737;
@ -86,7 +87,7 @@ class controls {
colorBackground[] = {0.8,0.8,0.8,1}; colorBackground[] = {0.8,0.8,0.8,1};
colorBackgroundActive[] = {1,1,1,1}; colorBackgroundActive[] = {1,1,1,1};
colorFocused[] = {1,1,1,1}; colorFocused[] = {1,1,1,1};
// onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorWhite""]"; onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorWhite""]";
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorWhite")]); // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorWhite")]);
}; };
}; };

View File

@ -27,7 +27,7 @@ class RscTitles {
y = Y_gps; y = Y_gps;
w = W_gps; w = W_gps;
h = H_gps; h = H_gps;
text = PATHTOF(\UI\mapGps.paa); text = PATHTOF(UI\mapGps.paa);
colorBackground[] = {1, 1, 1, 1}; colorBackground[] = {1, 1, 1, 1};
}; };
class heading: RscText{ class heading: RscText{

View File

@ -18,8 +18,8 @@
#define DIST_TOP_TO_CENTER_PERC 0.65 #define DIST_TOP_TO_CENTER_PERC 0.65
#define DIST_LEFT_TO_CENTER_PERC 0.30 #define DIST_LEFT_TO_CENTER_PERC 0.30
if (GVAR(mapToolsShown) == 0) exitWith {false}; if (GVAR(mapTool_Shown) == 0) exitWith {false};
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapToolsShown) - 1); _textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1);
_pos = [_this select 0, _this select 1, 0]; _pos = [_this select 0, _this select 1, 0];
_relPos = _pos vectorDiff [GVAR(mapTool_pos) select 0, GVAR(mapTool_pos) select 1, 0]; _relPos = _pos vectorDiff [GVAR(mapTool_pos) select 0, GVAR(mapTool_pos) select 1, 0];

View File

@ -17,44 +17,44 @@
#define CONSTANT_SCALE 0.2 #define CONSTANT_SCALE 0.2
// If markers exist and they should'nt, delete them // If markers exist and they should'nt, delete them
if (!("ACE_MapTools" in items player) || {GVAR(mapToolsShown) == 0}) then { if (!("ACE_MapTools" in items player) || {GVAR(mapTool_Shown) == 0}) then {
// If markers exist, delete them // If markers exist, delete them
if (!isNil QGVAR(mapTool_markerRotatingFixed)) then { if (!isNil QGVAR(mapTool_markerRotatingFixed)) then {
deleteMarkerLocal MARKERNAME_MAPTOOL_FIXED; deleteMarkerLocal MARKERNAME_MAPTOOL_FIXED;
GVAR(mapTool_markerRotatingFixed) = nil; GVAR(mapTool_markerRotatingFixed) = nil;
}; };
}; };
if (!("ACE_MapTools" in items player) || {GVAR(mapToolsShown) != 1}) then { if (!("ACE_MapTools" in items player) || {GVAR(mapTool_Shown) != 1}) then {
if (!isNil "GVAR(mapTool_markerRotatingNormal)") then { if (!isNil "GVAR(mapTool_markerRotatingNormal)") then {
deleteMarkerLocal MARKERNAME_MAPTOOL_ROTATINGNORMAL; deleteMarkerLocal MARKERNAME_MAPTOOL_ROTATINGNORMAL;
GVAR(mapTool_markerRotatingNormal) = nil; GVAR(mapTool_markerRotatingNormal) = nil;
}; };
}; };
if (!("ACE_MapTools" in items player) || {GVAR(mapToolsShown) != 2}) then { if (!("ACE_MapTools" in items player) || {GVAR(mapTool_Shown) != 2}) then {
if (!isNil "GVAR(mapTool_markerRotatingSmall)") then { if (!isNil "GVAR(mapTool_markerRotatingSmall)") then {
deleteMarkerLocal MARKERNAME_MAPTOOL_ROTATINGSMALL; deleteMarkerLocal MARKERNAME_MAPTOOL_ROTATINGSMALL;
GVAR(mapTool_markerRotatingSmall) = nil; GVAR(mapTool_markerRotatingSmall) = nil;
}; };
}; };
if (!("ACE_MapTools" in items player)|| {GVAR(mapToolsShown) == 0}) exitWith {}; if (!("ACE_MapTools" in items player)|| {GVAR(mapTool_Shown) == 0}) exitWith {};
// If markers don't exist and should, create them // If markers don't exist and should, create them
if (isNil QGVAR(mapTool_markerRotatingFixed)) then { if (isNil QGVAR(mapTool_markerRotatingFixed)) then {
GVAR(mapTool_markerRotatingFixed) = createMarkerLocal [MARKERNAME_MAPTOOL_FIXED, GVAR(mapTool_pos)]; GVAR(mapTool_markerRotatingFixed) = createMarkerLocal [MARKERNAME_MAPTOOL_FIXED, GVAR(mapTool_pos)];
MARKERNAME_MAPTOOL_FIXED setMarkerType MARKERNAME_MAPTOOL_FIXED; MARKERNAME_MAPTOOL_FIXED setMarkerType MARKERNAME_MAPTOOL_FIXED;
}; };
if ((isNil "GVAR(mapTool_markerRotatingNormal)") && {GVAR(mapToolsShown) == 1}) then { if ((isNil "GVAR(mapTool_markerRotatingNormal)") && {GVAR(mapTool_Shown) == 1}) then {
GVAR(mapTool_markerRotatingNormal) = createMarkerLocal [MARKERNAME_MAPTOOL_ROTATINGNORMAL, GVAR(mapTool_pos)]; GVAR(mapTool_markerRotatingNormal) = createMarkerLocal [MARKERNAME_MAPTOOL_ROTATINGNORMAL, GVAR(mapTool_pos)];
MARKERNAME_MAPTOOL_ROTATINGNORMAL setMarkerType MARKERNAME_MAPTOOL_ROTATINGNORMAL; MARKERNAME_MAPTOOL_ROTATINGNORMAL setMarkerType MARKERNAME_MAPTOOL_ROTATINGNORMAL;
}; };
if ((isNil "GVAR(mapTool_markerRotatingSmall)") && {GVAR(mapToolsShown) == 2}) then { if ((isNil "GVAR(mapTool_markerRotatingSmall)") && {GVAR(mapTool_Shown) == 2}) then {
GVAR(mapTool_markerRotatingSmall) = createMarkerLocal [MARKERNAME_MAPTOOL_ROTATINGSMALL, GVAR(mapTool_pos)]; GVAR(mapTool_markerRotatingSmall) = createMarkerLocal [MARKERNAME_MAPTOOL_ROTATINGSMALL, GVAR(mapTool_pos)];
MARKERNAME_MAPTOOL_ROTATINGSMALL setMarkerType MARKERNAME_MAPTOOL_ROTATINGSMALL; MARKERNAME_MAPTOOL_ROTATINGSMALL setMarkerType MARKERNAME_MAPTOOL_ROTATINGSMALL;
}; };
_rotatingMarker = [MARKERNAME_MAPTOOL_ROTATINGNORMAL, MARKERNAME_MAPTOOL_ROTATINGSMALL] select (GVAR(mapToolsShown) - 1); _rotatingMarker = [MARKERNAME_MAPTOOL_ROTATINGNORMAL, MARKERNAME_MAPTOOL_ROTATINGSMALL] select (GVAR(mapTool_Shown) - 1);
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapToolsShown) - 1); _textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1);
// Update scale of both parts // Update scale of both parts
_scale = _textureWidth * CONSTANT_SCALE * (call FUNC(calculateMapScale)); _scale = _textureWidth * CONSTANT_SCALE * (call FUNC(calculateMapScale));