mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
mapOnZoomSetMarkerSize upgrade
Add exitWith to remove wasted resizing during scrolling
Add config entry for custom adjustments
Change how adjustment calculation is made.
Added new min calculation.
Adjust cfg marker sets sizing to fit new setup
🤘
This commit is contained in:
parent
b71b86c4a7
commit
f8a7a569ce
@ -391,16 +391,20 @@ if(getNumber(('CfgEpochClient' call EPOCH_returnConfig) >> 'mapOnZoomSetMarkerSi
|
|||||||
if(_mapScale != EPOCH_lastMapScale)then{
|
if(_mapScale != EPOCH_lastMapScale)then{
|
||||||
EPOCH_lastMapScale = _mapScale;
|
EPOCH_lastMapScale = _mapScale;
|
||||||
for "_i" from 0 to ((count _mapMarkers) - 1) do {
|
for "_i" from 0 to ((count _mapMarkers) - 1) do {
|
||||||
|
if(_mapScale != EPOCH_lastMapScale)exitWith{};
|
||||||
_zoomMarker = _mapMarkers select _i;
|
_zoomMarker = _mapMarkers select _i;
|
||||||
private "_markerString";
|
private "_markerString";
|
||||||
_markerString = toArray _zoomMarker;
|
_markerString = toArray _zoomMarker;
|
||||||
_markerString resize 6;
|
_markerString resize 6;
|
||||||
if (toString _markerString == "EPOCH_") then {
|
if (toString _markerString == "EPOCH_") then {
|
||||||
_mSize = missionNamespace getVariable[_zoomMarker,[0.8,0.8]];
|
_mSize = missionNamespace getVariable[_zoomMarker,[0.666,0.666]];
|
||||||
_adjusted = _mapScale * 2.25;
|
_adj = 1.666;
|
||||||
_sizeX = (((_mSize select 0) / _adjusted) min 2.333) max 0.666;
|
_mapScaler = getArray(_config >> "mapScalerPresets");
|
||||||
_sizeY = (((_mSize select 1) / _adjusted) min 2.333) max 0.666;
|
{
|
||||||
_zoomMarker setMarkerSizeLocal [_sizeX,_sizeY];
|
if(_mapScale <= (_x select 0))then{_adj = (_x select 1)};
|
||||||
|
}forEach _mapScaler;
|
||||||
|
_min = (0.666/_mapScale) min 2.666;
|
||||||
|
_zoomMarker setMarkerSizeLocal [(((_mSize select 0) / (_mapScale * _adj)) min _min) max 0.666, (((_mSize select 1) / (_mapScale * _adj)) min _min) max 0.666];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -40,6 +40,15 @@
|
|||||||
class CfgMarkerSets
|
class CfgMarkerSets
|
||||||
{
|
{
|
||||||
brushes[] = {"Solid","SolidFull","Horizontal","Vertical","Grid","FDiagonal","BDiagonal","DiagGrid","Cross","Border","SolidBorder"};
|
brushes[] = {"Solid","SolidFull","Horizontal","Vertical","Grid","FDiagonal","BDiagonal","DiagGrid","Cross","Border","SolidBorder"};
|
||||||
|
mapScalerPresets[] = {
|
||||||
|
{1.00,2},
|
||||||
|
{0.80,2.25},
|
||||||
|
{0.60,2.5},
|
||||||
|
{0.30,2.75},
|
||||||
|
{0.21,3.25},
|
||||||
|
{0.12,3.5},
|
||||||
|
{0.8,3.75}
|
||||||
|
};
|
||||||
class PlayerMarker {
|
class PlayerMarker {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"EPOCH_PlayerMarker1","ICON","EpochActive_Hex","ColorBlue",1,{0.6,0.6}},
|
{"EPOCH_PlayerMarker1","ICON","EpochActive_Hex","ColorBlue",1,{0.6,0.6}},
|
||||||
@ -64,9 +73,9 @@ class CfgMarkerSets
|
|||||||
};
|
};
|
||||||
class PlantSpawn {
|
class PlantSpawn {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochActive_Diamond","ColorGreen",1,{1.1,1.1}},
|
{"","ICON","EpochActive_Diamond","ColorGreen",1,{0.8,0.8}},
|
||||||
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{1.1,1.1}},
|
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{0.8,0.8}},
|
||||||
{"","ICON","EpochPlant","ColorGreen",0.9,{1.2,1.2}}
|
{"","ICON","EpochPlant","ColorGreen",0.9,{0.9,0.9}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class AirDrop {
|
class AirDrop {
|
||||||
@ -78,23 +87,23 @@ class CfgMarkerSets
|
|||||||
};
|
};
|
||||||
class Carnival {
|
class Carnival {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochActive_Diamond","ColorOrange",1,{1.2,1.2}},
|
{"","ICON","EpochActive_Diamond","ColorOrange",1,{1,1}},
|
||||||
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{1.2,1.2}},
|
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{1,1}},
|
||||||
{"","ICON","EpochCarnival","ColorOrange",0.75,{1.3,1.3}}
|
{"","ICON","EpochCarnival","ColorOrange",0.75,{1.1,1.1}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Container {
|
class Container {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochActive_Diamond","ColorOrange",1,{1.2,1.2}},
|
{"","ICON","EpochActive_Diamond","ColorOrange",1,{1,1}},
|
||||||
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{1.2,1.2}},
|
{"","ICON","EpochBG_Diamond","ColorBlack",0.2,{1,1}},
|
||||||
{"","ICON","EpochContainer","ColorOrange",0.75,{1.3,1.3}}
|
{"","ICON","EpochContainer","ColorOrange",0.75,{1.1,1.1}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class EarthQuake {
|
class EarthQuake {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochActive_Circle","ColorGrey",1,{1.2,1.2}},
|
{"","ICON","EpochActive_Circle","ColorGrey",1,{0.8,0.8}},
|
||||||
{"","ICON","EpochBG_Circle","ColorBlack",0.2,{1.2,1.2}},
|
{"","ICON","EpochBG_Circle","ColorBlack",0.2,{0.8,0.8}},
|
||||||
{"","ICON","EpochGem","ColorRed",1,{1.3,1.3}}
|
{"","ICON","EpochGem","ColorRed",1,{0.9,0.9}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class ServicePoint {
|
class ServicePoint {
|
||||||
@ -106,58 +115,58 @@ class CfgMarkerSets
|
|||||||
};
|
};
|
||||||
class Radiation {
|
class Radiation {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Triangle","ColorBlack",0.3,{1.3,1.3}},
|
{"","ICON","EpochBG_Triangle","ColorBlack",0.3,{0.7,0.7}},
|
||||||
{"","ICON","EpochActive_Triangle","ColorYellow",1,{1.1,1.1}},
|
{"","ICON","EpochActive_Triangle","ColorYellow",1,{0.7,0.7}},
|
||||||
{"","ICON","EpochRadiation","ColorYellow",1,{0.6,0.6}}
|
{"","ICON","EpochRadiation","ColorYellow",1,{0.9,0.9}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Satellite {
|
class Satellite {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Triangle","ColorBlack",0.15,{1.3,1.3},58},
|
{"","ICON","EpochBG_Triangle","ColorBlack",0.15,{0.7,0.7},58},
|
||||||
{"","ICON","EpochActive_Triangle","ColorYellow",0.5,{1.1,1.1},58},
|
{"","ICON","EpochActive_Triangle","ColorYellow",0.5,{0.7,0.7},58},
|
||||||
{"","ICON","EpochSatellite","ColorYellow",1,{0.6,0.6},58}
|
{"","ICON","EpochSatellite","ColorYellow",1,{0.9,0.9},58}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class MissionNoob {
|
class MissionNoob {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
|
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1,1}},
|
||||||
{"","ICON","EpochActive_Square","ColorGreen",0.5,{1.2,1.2}},
|
{"","ICON","EpochActive_Square","ColorGreen",0.5,{1,1}},
|
||||||
{"","ICON","EpochMissionNoob1","ColorYellow",1,{1,1}}
|
{"","ICON","EpochMissionNoob1","ColorYellow",1,{0.9,0.9}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class MissionNoobPlus {
|
class MissionNoobPlus {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
|
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1,1}},
|
||||||
{"","ICON","EpochActive_Square","ColorGreen",0.75,{1.2,1.2}},
|
{"","ICON","EpochActive_Square","ColorGreen",0.75,{1,1}},
|
||||||
{"","ICON","EpochMissionNoob2","ColorYellow",1,{1,1}}
|
{"","ICON","EpochMissionNoob2","ColorYellow",1,{0.9,0.9}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class MissionSurvivor {
|
class MissionSurvivor {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
|
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1,1}},
|
||||||
{"","ICON","EpochActive_Square","ColorBlue",0.5,{1.2,1.2}},
|
{"","ICON","EpochActive_Square","ColorBlue",0.5,{1,1}},
|
||||||
{"","ICON","EpochMissionMedium1","ColorGreen",1,{1,1}}
|
{"","ICON","EpochMissionMedium1","ColorGreen",1,{0.9,0.9}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class MissionSurvivorPlus {
|
class MissionSurvivorPlus {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
|
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1,1}},
|
||||||
{"","ICON","EpochActive_Square","ColorBlue",0.75,{1.2,1.2}},
|
{"","ICON","EpochActive_Square","ColorBlue",0.75,{1,1}},
|
||||||
{"","ICON","EpochMissionMedium2","ColorGreen",1,{1,1}}
|
{"","ICON","EpochMissionMedium2","ColorGreen",1,{0.9,0.9}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class MissionSlaughter {
|
class MissionSlaughter {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
|
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1,1}},
|
||||||
{"","ICON","EpochActive_Square","ColorRed",0.5,{1.2,1.2}},
|
{"","ICON","EpochActive_Square","ColorRed",0.5,{1,1}},
|
||||||
{"","ICON","EpochMissionVeteran1","ColorBlue",1,{1,1}}
|
{"","ICON","EpochMissionVeteran1","ColorBlue",1,{0.9,0.9}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class MissionSlaughterPlus {
|
class MissionSlaughterPlus {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1.2,1.2}},
|
{"","ICON","EpochBG_Square","ColorBlack",0.15,{1,1}},
|
||||||
{"","ICON","EpochActive_Square","ColorRed",0.75,{1.2,1.2}},
|
{"","ICON","EpochActive_Square","ColorRed",0.75,{1,1}},
|
||||||
{"","ICON","EpochMissionVeteran2","ColorBlue",1,{1,1}}
|
{"","ICON","EpochMissionVeteran2","ColorBlue",1,{0.9,0.9}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class IGSafeZones {
|
class IGSafeZones {
|
||||||
@ -168,30 +177,30 @@ class CfgMarkerSets
|
|||||||
};
|
};
|
||||||
class StaticTrader {
|
class StaticTrader {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.8,0.8}},
|
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.6,0.6}},
|
||||||
{"","ICON","EpochActive_Circle","ColorRed",0.75,{0.8,0.8}},
|
{"","ICON","EpochActive_Circle","ColorRed",0.75,{0.6,0.6}},
|
||||||
{"","ICON","EpochStaticTrader","ColorBlack",1,{0.7,0.7}}
|
{"","ICON","EpochStaticTrader","ColorBlack",1,{0.5,0.5}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class DynamicTrader {
|
class DynamicTrader {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.8,0.8}},
|
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.6,0.6}},
|
||||||
{"","ICON","EpochActive_Circle","ColorGreen",0.75,{0.8,0.8}},
|
{"","ICON","EpochActive_Circle","ColorGreen",0.75,{0.6,0.6}},
|
||||||
{"","ICON","EpochDynamicTrader","ColorBrown",1,{0.7,0.7}}
|
{"","ICON","EpochDynamicTrader","ColorBrown",1,{0.5,0.5}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class NewDynamicTrader {
|
class NewDynamicTrader {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.8,0.8}},
|
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.6,0.6}},
|
||||||
{"","ICON","EpochActive_Circle","ColorKhaki",0.75,{0.8,0.8}},
|
{"","ICON","EpochActive_Circle","ColorKhaki",0.75,{0.6,0.6}},
|
||||||
{"","ICON","EpochStaticTrader","ColorKhaki",1,{0.7,0.7}}
|
{"","ICON","EpochStaticTrader","ColorKhaki",1,{0.5,0.5}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Shipwreck {
|
class Shipwreck {
|
||||||
markerArray[] = {
|
markerArray[] = {
|
||||||
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.8,0.8}},
|
{"","ICON","EpochBG_Circle","ColorWhite",0.15,{0.6,0.6}},
|
||||||
{"","ICON","EpochActive_Circle","ColorOrange",1,{0.8,0.8}},
|
{"","ICON","EpochActive_Circle","ColorOrange",1,{0.6,0.6}},
|
||||||
{"","ICON","EpochShipwreck","ColorOrange",1,{0.7,0.7}}
|
{"","ICON","EpochShipwreck","ColorOrange",1,{0.5,0.5}}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user