mapOnZoomSetMarkerSize upgrades to maintain preset size scaling

all markers now scaled based on sizing desired in the cfgMarkerSets.
Adjustment of 2.25 to the mapScale was added to achieve smaller markers sooner and maintain non cluttered map markers
This commit is contained in:
DirtySanchez 2017-10-20 13:49:16 -05:00
parent 3307fdc54c
commit 5427db38fe
4 changed files with 20 additions and 20 deletions

View File

@ -96,7 +96,8 @@ if(isNil {Epoch_markerCounter})then{Epoch_markerCounter = 0};
if!(_mColor isEqualTo "")then{
_mName setMarkerColorLocal _mColor
};
missionNameSpace setVariable[_mName, _mSize];
if(_mName isEqualTo (format["EPOCH_marker_%1", Epoch_markerCounter]))then{
Epoch_markerCounter = Epoch_markerCounter + 1;
};

View File

@ -385,9 +385,6 @@ if(getNumber(('CfgEpochClient' call EPOCH_returnConfig) >> 'mapOnZoomSetMarkerSi
if(visibleMap)then{
_mapScale = ctrlMapScale ((findDisplay 12) displayCtrl 51);
_mapMarkers = allMapMarkers;
{
if((uiNamespace getVariable[_x,[]]) isEqualTo [])then {uiNamespace setVariable[_x,[(getMarkerSize _x) select 0,(getMarkerSize _x) select 1]]};
}forEach _mapMarkers;
if(isNil {EPOCH_lastMapScale})then{EPOCH_lastMapScale = 0};
@ -399,9 +396,10 @@ if(getNumber(('CfgEpochClient' call EPOCH_returnConfig) >> 'mapOnZoomSetMarkerSi
_markerString = toArray _zoomMarker;
_markerString resize 6;
if (toString _markerString == "EPOCH_") then {
_var = uiNamespace getVariable[_zoomMarker,[0.8,0.8]];
_sizeX = (((_var select 0) / _mapScale) min 1.8) max 0.666;
_sizeY = (((_var select 1) / _mapScale) min 1.8) max 0.666;
_mSize = missionNamespace getVariable[_zoomMarker,[0.8,0.8]];
_adjusted = _mapScale * 2.25;
_sizeX = (((_mSize select 0) / _adjusted) min 2.333) max 0.666;
_sizeY = (((_mSize select 1) / _adjusted) min 2.333) max 0.666;
_zoomMarker setMarkerSizeLocal [_sizeX,_sizeY];
};
};

View File

@ -42,17 +42,17 @@ class CfgMarkerSets
brushes[] = {"Solid","SolidFull","Horizontal","Vertical","Grid","FDiagonal","BDiagonal","DiagGrid","Cross","Border","SolidBorder"};
class PlayerMarker {
markerArray[] = {
{"EPOCH_PlayerMarker1","ICON","EpochActive_Hex","ColorBlue",1,{0.9,0.9}},
{"EPOCH_PlayerMarker2","ICON","EpochBG_Hex","ColorWhite",0.3,{0.9,0.9}},
{"EPOCH_PlayerMarker3","ICON","EpochGPS","ColorBlue",1,{0.8,0.8},0,"format['%1/%2',(format[mapGridPosition player]) select [0,3],(format[mapGridPosition player]) select [3,3]]"}
{"EPOCH_PlayerMarker1","ICON","EpochActive_Hex","ColorBlue",1,{0.6,0.6}},
{"EPOCH_PlayerMarker2","ICON","EpochBG_Hex","ColorWhite",0.3,{0.6,0.6}},
{"EPOCH_PlayerMarker3","ICON","EpochGPS","ColorBlue",1,{0.5,0.5},0,"format['%1/%2',(format[mapGridPosition player]) select [0,3],(format[mapGridPosition player]) select [3,3]]"}
};
};
class DeathMarker {
markerArray[] = {
{"EPOCH_DeathMarker1","ICON","EpochActive_Circle","ColorRed",1,{0.9,0.9}},
{"EPOCH_DeathMarker2","ICON","EpochBG_Circle","ColorPink",0.3,{0.9,0.9}},
{"EPOCH_DeathMarker3","ICON","EpochSkull","ColorRed",1,{0.8,0.8},0,"str(name player)"}
{"EPOCH_DeathMarker1","ICON","EpochActive_Circle","ColorRed",1,{0.6,0.6}},
{"EPOCH_DeathMarker2","ICON","EpochBG_Circle","ColorPink",0.3,{0.6,0.6}},
{"EPOCH_DeathMarker3","ICON","EpochSkull","ColorRed",1,{0.5,0.5},0,"str(name player)"}
};
};
class EpochDebugBox {
@ -106,16 +106,16 @@ class CfgMarkerSets
};
class Radiation {
markerArray[] = {
{"","ICON","EpochBG_Triangle","ColorBlack",0.3,{1.5,1.5}},
{"","ICON","EpochActive_Triangle","ColorYellow",1,{1.3,1.3}},
{"","ICON","EpochRadiation","ColorYellow",1,{0.75,0.75}}
{"","ICON","EpochBG_Triangle","ColorBlack",0.3,{1.3,1.3}},
{"","ICON","EpochActive_Triangle","ColorYellow",1,{1.1,1.1}},
{"","ICON","EpochRadiation","ColorYellow",1,{0.6,0.6}}
};
};
class Satellite {
markerArray[] = {
{"","ICON","EpochBG_Triangle","ColorBlack",0.15,{1.5,1.5},58},
{"","ICON","EpochActive_Triangle","ColorYellow",0.5,{1.3,1.3},58},
{"","ICON","EpochSatellite","ColorYellow",1,{0.75,0.75},58}
{"","ICON","EpochBG_Triangle","ColorBlack",0.15,{1.3,1.3},58},
{"","ICON","EpochActive_Triangle","ColorYellow",0.5,{1.1,1.1},58},
{"","ICON","EpochSatellite","ColorYellow",1,{0.6,0.6},58}
};
};
class MissionNoob {

View File

@ -89,7 +89,8 @@ _return = [];
if!(_mColor isEqualTo "")then{
_mName setMarkerColor _mColor
};
missionNameSpace setVariable[_mName, _mSize, true];
Epoch_markerCounterGlobal = Epoch_markerCounterGlobal + 1;
}forEach _markerArray;