Jump to content
negaiette

Custom map and controls script

Recommended Posts

Hello. I started to create my own map dialog and was able to position the RscMapControl inside it. The card works, but there are several problems. First: I cannot tag. Second: you cannot zoom in and out of the map either. And here is, in fact, the question. Is it possible to somehow drag all (or at least some) map control functions into the dialog, or do you need to write everything from scratch?

Share this post


Link to post
Share on other sites
3 hours ago, sarogahtyp said:

provide some info!

I mean some default functions, like a zoom in and zoom out, create marker, toggle map textures etc

Share this post


Link to post
Share on other sites

all I know bout this is zoom in/out works with RscMapControl  allready. No need to add anything for it.

Share this post


Link to post
Share on other sites
3 hours ago, sarogahtyp said:

all I know bout this is zoom in/out works with RscMapControl  allready. No need to add anything for it.

So..Look, its my current RcsMapControl and only, what i can do with map - its moving map, but nothing else.
 

class RscMapControl {
	deletable = 0;
	fade = 0;
	access = 0;
	type = CT_MAP_MAIN;
	idc = 51;
	style = ST_MULTI + ST_TITLE_BAR;
	colorBackground[] = {0.969,0.957,0.949,1};
	colorOutside[] = {0,0,0,1};
	colorText[] = {0,0,0,1};
	font = "TahomaB";
	sizeEx = 0.04;
	colorSea[] = {0.467,0.631,0.851,0.5};
	colorForest[] = {0.624,0.78,0.388,0.5};
	colorRocks[] = {0,0,0,0.3};
	colorCountlines[] = {0.572,0.354,0.188,0.25};
	colorMainCountlines[] = {0.572,0.354,0.188,0.5};
	colorCountlinesWater[] = {0.491,0.577,0.702,0.3};
	colorMainCountlinesWater[] = {0.491,0.577,0.702,0.6};
	colorForestBorder[] = {0,0,0,0};
	colorRocksBorder[] = {0,0,0,0};
	colorPowerLines[] = {0.1,0.1,0.1,1};
	colorRailWay[] = {0.8,0.2,0,1};
	colorNames[] = {0.1,0.1,0.1,0.9};
	colorInactive[] = {1,1,1,0.5};
	colorLevels[] = {0.286,0.177,0.094,0.5};
	colorTracks[] = {0.84,0.76,0.65,0.15};
	colorRoads[] = {0.7,0.7,0.7,1};
	colorMainRoads[] = {0.9,0.5,0.3,1};
	colorTracksFill[] = {0.84,0.76,0.65,1};
	colorRoadsFill[] = {1,1,1,1};
	colorMainRoadsFill[] = {1,0.6,0.4,1};
	colorGrid[] = {0.1,0.1,0.1,0.6};
	colorGridMap[] = {0.1,0.1,0.1,0.6};
	stickX[] = {0.2,["Gamma",1,1.5]};
	stickY[] = {0.2,["Gamma",1,1.5]};
	class Legend
	{
		colorBackground[] = {1,1,1,0.5};
		color[] = {0,0,0,1};
		x = SafeZoneX + GUI_GRID_W;
		y = SafeZoneY + safezoneH - 4.5 * GUI_GRID_H;
		w = 10 * GUI_GRID_W;
		h = 3.5 * GUI_GRID_H;
		font = "RobotoCondensed";
		sizeEx = GUI_TEXT_SIZE_SMALL;
	};
	class ActiveMarker
	{
		color[] = {0.3,0.1,0.9,1};
		size = 50;
	};
	class Command
	{
		color[] = {1,1,1,1};
		icon = "\a3\ui_f\data\map\mapcontrol\waypoint_ca.paa";
		size = 18;
		importance = 1;
		coefMin = 1;
		coefMax = 1;
	};
	class Task
	{
		taskNone = "#(argb,8,8,3)color(0,0,0,0)";
		taskCreated = "#(argb,8,8,3)color(0,0,0,1)";
		taskAssigned = "#(argb,8,8,3)color(1,1,1,1)";
		taskSucceeded = "#(argb,8,8,3)color(0,1,0,1)";
		taskFailed = "#(argb,8,8,3)color(1,0,0,1)";
		taskCanceled = "#(argb,8,8,3)color(1,0.5,0,1)";
		colorCreated[] = {1,1,1,1};
		colorCanceled[] = {0.7,0.7,0.7,1};
		colorDone[] = {0.7,1,0.3,1};
		colorFailed[] = {1,0.3,0.2,1};
		color[] =
		{
			"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])",
			"(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])",
			"(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",
			"(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"
		};
		icon = "\A3\ui_f\data\map\mapcontrol\taskIcon_CA.paa";
		iconCreated = "\A3\ui_f\data\map\mapcontrol\taskIconCreated_CA.paa";
		iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
		iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
		iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa";
		size = 27;
		importance = 1;
		coefMin = 1;
		coefMax = 1;
	};
	class CustomMark
	{
		color[] = {1,1,1,1};
		icon = "\a3\ui_f\data\map\mapcontrol\custommark_ca.paa";
		size = 18;
		importance = 1;
		coefMin = 1;
		coefMax = 1;
	};
	class Tree
	{
		color[] = {0.45,0.64,0.33,0.4};
		icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
		size = 12;
		importance = "0.9 * 16 * 0.05";
		coefMin = 0.25;
		coefMax = 4;
	};
	class SmallTree
	{
		color[] = {0.45,0.64,0.33,0.4};
		icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
		size = 12;
		importance = "0.6 * 12 * 0.05";
		coefMin = 0.25;
		coefMax = 4;
	};
	class Bush
	{
		color[] = {0.45,0.64,0.33,0.4};
		icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
		size = "14/2";
		importance = "0.2 * 14 * 0.05 * 0.05";
		coefMin = 0.25;
		coefMax = 4;
	};
	class Church
	{
		color[] = {1,1,1,1};
		icon = "\A3\ui_f\data\map\mapcontrol\church_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class Chapel
	{
		color[] = {0,0,0,1};
		icon = "\A3\ui_f\data\map\mapcontrol\Chapel_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class Cross
	{
		color[] = {0,0,0,1};
		icon = "\A3\ui_f\data\map\mapcontrol\Cross_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class Rock
	{
		color[] = {0.1,0.1,0.1,0.8};
		icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa";
		size = 12;
		importance = "0.5 * 12 * 0.05";
		coefMin = 0.25;
		coefMax = 4;
	};
	class Bunker
	{
		color[] = {0,0,0,1};
		icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";
		size = 14;
		importance = "1.5 * 14 * 0.05";
		coefMin = 0.25;
		coefMax = 4;
	};
	class Fortress
	{
		color[] = {0,0,0,1};
		icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";
		size = 16;
		importance = "2 * 16 * 0.05";
		coefMin = 0.25;
		coefMax = 4;
	};
	class Fountain
	{
		color[] = {0,0,0,1};
		icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa";
		size = 11;
		importance = "1 * 12 * 0.05";
		coefMin = 0.25;
		coefMax = 4;
	};
	class ViewTower
	{
		color[] = {0,0,0,1};
		icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa";
		size = 16;
		importance = "2.5 * 16 * 0.05";
		coefMin = 0.5;
		coefMax = 4;
	};
	class Lighthouse
	{
		color[] = {1,1,1,1};
		icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class Quay
	{
		color[] = {1,1,1,1};
		icon = "\A3\ui_f\data\map\mapcontrol\quay_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class Fuelstation
	{
		color[] = {1,1,1,1};
		icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class Hospital
	{
		color[] = {1,1,1,1};
		icon = "\A3\ui_f\data\map\mapcontrol\hospital_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class BusStop
	{
		color[] = {1,1,1,1};
		icon = "\A3\ui_f\data\map\mapcontrol\busstop_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class LineMarker
	{
		textureComboBoxColor = "#(argb,8,8,3)color(1,1,1,1)";
		lineWidthThin = 0.008;
		lineWidthThick = 0.014;
		lineDistanceMin = 3e-005;
		lineLengthMin = 5;
	};
	class Transmitter
	{
		color[] = {1,1,1,1};
		icon = "\A3\ui_f\data\map\mapcontrol\transmitter_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class Stack
	{
		color[] = {0,0,0,1};
		icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa";
		size = 16;
		importance = "2 * 16 * 0.05";
		coefMin = 0.4;
		coefMax = 2;
	};
	class Ruin
	{
		color[] = {0,0,0,1};
		icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa";
		size = 16;
		importance = "1.2 * 16 * 0.05";
		coefMin = 1;
		coefMax = 4;
	};
	class Tourism
	{
		color[] = {0,0,0,1};
		icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa";
		size = 16;
		importance = "1 * 16 * 0.05";
		coefMin = 0.7;
		coefMax = 4;
	};
	class Watertower
	{
		color[] = {1,1,1,1};
		icon = "\A3\ui_f\data\map\mapcontrol\watertower_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
	};
	class Waypoint
	{
		color[] = {1,1,1,1};
		importance = 1;
		coefMin = 1;
		coefMax = 1;
		icon = "\a3\ui_f\data\map\mapcontrol\waypoint_ca.paa";
		size = 18;
	};
	class WaypointCompleted
	{
		color[] = {1,1,1,1};
		importance = 1;
		coefMin = 1;
		coefMax = 1;
		icon = "\a3\ui_f\data\map\mapcontrol\waypointcompleted_ca.paa";
		size = 18;
	};
	moveOnEdges = 1;
	x = "SafeZoneXAbs";
	y = SafeZoneY + 1.5 * GUI_GRID_H;
	w = "SafeZoneWAbs";
	h = SafeZoneH - 1.5 * GUI_GRID_H;
	shadow = 0;
	ptsPerSquareSea = 5;
	ptsPerSquareTxt = 20;
	ptsPerSquareCLn = 10;
	ptsPerSquareExp = 10;
	ptsPerSquareCost = 10;
	ptsPerSquareFor = 9;
	ptsPerSquareForEdge = 9;
	ptsPerSquareRoad = 6;
	ptsPerSquareObj = 9;
	showCountourInterval = 0;
	scaleMin = 0.001;
	scaleMax = 1;
	scaleDefault = 0.16;
	maxSatelliteAlpha = 0.85;
	alphaFadeStartScale = 2;
	alphaFadeEndScale = 2;
	colorTrails[] = {0.84,0.76,0.65,0.15};
	colorTrailsFill[] = {0.84,0.76,0.65,0.65};
	widthRailWay = 4;
	fontLabel = "RobotoCondensed";
	sizeExLabel = GUI_TEXT_SIZE_SMALL;
	fontGrid = "TahomaB";
	sizeExGrid = 0.02;
	fontUnits = "TahomaB";
	sizeExUnits = GUI_TEXT_SIZE_SMALL;
	fontNames = "RobotoCondensed";
	sizeExNames = GUI_TEXT_SIZE_SMALL * 2;
	fontInfo = "RobotoCondensed";
	sizeExInfo = GUI_TEXT_SIZE_SMALL;
	fontLevel = "TahomaB";
	sizeExLevel = 0.02;
	text = "#(argb,8,8,3)color(1,1,1,1)";
	idcMarkerColor = -1;
	idcMarkerIcon = -1;
	textureComboBoxColor = "#(argb,8,8,3)color(1,1,1,1)";
	showMarkers = 1;
	class power
	{
		icon = "\A3\ui_f\data\map\mapcontrol\power_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
		color[] = {1,1,1,1};
	};
	class powersolar
	{
		icon = "\A3\ui_f\data\map\mapcontrol\powersolar_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
		color[] = {1,1,1,1};
	};
	class powerwave
	{
		icon = "\A3\ui_f\data\map\mapcontrol\powerwave_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
		color[] = {1,1,1,1};
	};
	class powerwind
	{
		icon = "\A3\ui_f\data\map\mapcontrol\powerwind_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
		color[] = {1,1,1,1};
	};
	class Shipwreck
	{
		icon = "\A3\ui_f\data\map\mapcontrol\Shipwreck_CA.paa";
		size = 24;
		importance = 1;
		coefMin = 0.85;
		coefMax = 1;
		color[] = {0,0,0,1};
	};
};

 

Share this post


Link to post
Share on other sites

my working map classes and the dialog:

Spoiler

class saroWarfare_map_control_common_parent: RscMapControl
{
	idc = -1;
	deletable = 0;
	fade = 0;
	access = 0;
	type = CT_MAP_MAIN;
	style = ST_MULTI + ST_TITLE_BAR;
	font = "TahomaB";
	sizeEx = 0.04;
	size = STANDARD_GUI_TEXT_SIZE;
	colorBackground[] = BLACK_NO_COLOUR;
	colorOutside[] = BLACK_NO_COLOUR;
};

class saroWarfare_map_control_common_parent_blue: saroWarfare_map_control_common_parent
{
	colorText[] = BLUE_FOREGROUND_ENABLED_8;
};

class saroWarfare_dialog_choose_spawn_blue
{
	idd = 42000;
	movingEnable = true;
	
	class ControlsBackground
	{
		class saroWarfare_background_spawn_blue: saroWarfare_background_2048_common_parent_blue
		{
			idc = 420001;
			x = safeZoneX + safeZoneW * 0.018;
			y = safeZoneY + safeZoneH * 0.014;
			w = safeZoneW * 0.846;
			h = safeZoneH * 0.98;
		};
		
		class saroWarfare_left_flag_blue: saroWarfare_show_flag_common_parent_blue
		{
			idc = 420005;
			x = safeZoneX + safeZoneW * 0.164;
			y = safeZoneY + safeZoneH * 0.102;
		};
		
		class saroWarfare_right_flag_blue: saroWarfare_left_flag_blue
		{
			idc = 420006;
			x = safeZoneX + safeZoneW * 0.645;
		};
	};
	
	class Controls
	{

		class saroWarfare_map_control_spawn_blue: saroWarfare_map_control_common_parent_blue
		{
			idc = 420003;
			x = safeZoneX + safeZoneW * 0.116;
			y = safeZoneY + safeZoneH * 0.161;
			w = safeZoneW * 0.624;
			h = safeZoneH * 0.686;
		};
		
		class saroWarfare_vote_button_spawn_blue: saroWarfare_medium_button_common_parent_blue
		{
			idc = 420002;
			x = safeZoneX + safeZoneW * 0.468;
			y = safeZoneY + safeZoneH * 0.861;
			text = "Vote";
			action = "saroWarfare_spawn_area_voted = true;";
		};

		class saroWarfare_vote_timer_spawn_blue: saroWarfare_structured_text_common_parent_blue
		{
			idc = 420004;
			x = safeZoneX + safeZoneW * 0.363;
			y = safeZoneY + safeZoneH * 0.866;
			w = safeZoneW * 0.038;
			h = safeZoneH * 0.037;
			text = "";
		};
	};
};

 

 

and my defines:

Spoiler

#ifndef HG_CustomControlClassesh
#define HG_CustomControlClassesh 1

// text sizes
#define STANDARD_GUI_TEXT_SIZE	(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)
#define BIGGER_GUI_TEXT_SIZE	1.4 * STANDARD_GUI_TEXT_SIZE
#define SMALLER_GUI_TEXT_SIZE	0.8 * STANDARD_GUI_TEXT_SIZE

// colours

#define BLACK_NO_COLOUR					{ 0, 0, 0, 0 }

#define BLUE_FOREGROUND_ENABLED			0.9, 0.9, 0
#define BLUE_FOREGROUND_ENABLED_6		{ BLUE_FOREGROUND_ENABLED, 0.6 }
#define BLUE_FOREGROUND_ENABLED_8		{ BLUE_FOREGROUND_ENABLED, 0.8 }
#define BLUE_FOREGROUND_ENABLED_10		{ BLUE_FOREGROUND_ENABLED, 1 }

#define BLUE_FOREGROUND_DISABLED		0.5, 0.5, 0
#define BLUE_FOREGROUND_DISABLED_6		{ BLUE_FOREGROUND_DISABLED, 0.6 }

#define BLUE_BACKGROUND_ENABLED			0, 0, 0.8
#define BLUE_BACKGROUND_ENABLED_1		{ BLUE_BACKGROUND_ENABLED, 0.1 }
#define BLUE_BACKGROUND_ENABLED_2		{ BLUE_BACKGROUND_ENABLED, 0.2 }
#define BLUE_BACKGROUND_ENABLED_3		{ BLUE_BACKGROUND_ENABLED, 0.3 }

#define BLUE_BACKGROUND_DISABLED		0, 0, 0.5
#define BLUE_BACKGROUND_DISABLED_1		{ BLUE_BACKGROUND_DISABLED, 0.1 }
#define BLUE_BACKGROUND_DISABLED_2		{ BLUE_BACKGROUND_DISABLED, 0.2 }

#define BLUE_FOREGROUND_ENABLED_HTML	"#E6E600"
#define BLUE_BACKGROUND_DISABLED_HTML	"#000080"


#define RED_FOREGROUND_ENABLED			0, 1, 0.9
#define RED_FOREGROUND_ENABLED_6		{ RED_FOREGROUND_ENABLED, 0.6 }
#define RED_FOREGROUND_ENABLED_8		{ RED_FOREGROUND_ENABLED, 0.8 }
#define RED_FOREGROUND_ENABLED_10		{ RED_FOREGROUND_ENABLED, 1 }

#define RED_FOREGROUND_DISABLED			0, 0.5, 0.5
#define RED_FOREGROUND_DISABLED_6		{ RED_FOREGROUND_DISABLED, 0.6 }

#define RED_BACKGROUND_ENABLED			0.8, 0, 0.2
#define RED_BACKGROUND_ENABLED_1		{ RED_BACKGROUND_ENABLED, 0.1 }
#define RED_BACKGROUND_ENABLED_2		{ RED_BACKGROUND_ENABLED, 0.2 }
#define RED_BACKGROUND_ENABLED_3		{ RED_BACKGROUND_ENABLED, 0.3 }

#define RED_BACKGROUND_DISABLED			0.5, 0, 0
#define RED_BACKGROUND_DISABLED_1		{ RED_BACKGROUND_DISABLED, 0.1 }
#define RED_BACKGROUND_DISABLED_2		{ RED_BACKGROUND_DISABLED, 0.2 }

#define RED_FOREGROUND_ENABLED_HTML		"#00FFE6"
#define RED_BACKGROUND_DISABLED_HTML	"#800000"

#define GREEN_FOREGROUND_ENABLED		1, 0.3, 0.7
#define GREEN_FOREGROUND_ENABLED_6		{ GREEN_FOREGROUND_ENABLED, 0.6 }
#define GREEN_FOREGROUND_ENABLED_8		{ GREEN_FOREGROUND_ENABLED, 0.8 }
#define GREEN_FOREGROUND_ENABLED_10		{ GREEN_FOREGROUND_ENABLED, 1 }

#define GREEN_FOREGROUND_DISABLED		0.3, 0, 0.3
#define GREEN_FOREGROUND_DISABLED_6		{ GREEN_FOREGROUND_DISABLED, 0.6 }

#define GREEN_BACKGROUND_ENABLED		0, 0.6, 0
#define GREEN_BACKGROUND_ENABLED_1		{ GREEN_BACKGROUND_ENABLED, 0.1 }
#define GREEN_BACKGROUND_ENABLED_2		{ GREEN_BACKGROUND_ENABLED, 0.2 }
#define GREEN_BACKGROUND_ENABLED_3		{ GREEN_BACKGROUND_ENABLED, 0.3 }

#define GREEN_BACKGROUND_DISABLED		0, 0.3, 0
#define GREEN_BACKGROUND_DISABLED_1		{ GREEN_BACKGROUND_DISABLED, 0.1 }
#define GREEN_BACKGROUND_DISABLED_2		{ GREEN_BACKGROUND_DISABLED, 0.2 }

#define GREEN_FOREGROUND_ENABLED_HTML	"#FF4DB3"
#define GREEN_BACKGROUND_DISABLED_HTML	"#004D00"

// control types
#define CT_STATIC				  0
#define CT_BUTTON				  1
#define CT_EDIT					  2
#define CT_SLIDER				  3
#define CT_COMBO				  4
#define CT_LISTBOX				  5
#define CT_TOOLBOX				  6
#define CT_CHECKBOXES			  7
#define CT_PROGRESS				  8
#define CT_HTML					  9
#define CT_STATIC_SKEW			 10
#define CT_ACTIVETEXT			 11
#define CT_TREE					 12
#define CT_STRUCTURED_TEXT		 13
#define CT_CONTEXT_MENU			 14
#define CT_CONTROLS_GROUP		 15
#define CT_SHORTCUTBUTTON		 16
#define CT_HITZONES				 17
#define CT_VEHICLETOGGLES		 18
#define CT_CONTROLS_TABLE		 19
#define CT_XKEYDESC				 40
#define CT_XBUTTON				 41
#define CT_XLISTBOX				 42
#define CT_XSLIDER				 43
#define CT_XCOMBO				 44
#define CT_ANIMATED_TEXTURE		 45
#define CT_MENU					 46
#define CT_MENU_STRIP			 47
#define CT_CHECKBOX				 77
#define CT_OBJECT				 80
#define CT_OBJECT_ZOOM			 81
#define CT_OBJECT_CONTAINER		 82
#define CT_OBJECT_CONT_ANIM		 83
#define CT_LINEBREAK			 98
#define CT_USER					 99
#define CT_MAP					100
#define CT_MAP_MAIN				101
#define CT_LISTNBOX				102
#define CT_ITEMSLOT				103
#define CT_LISTNBOX_CHECKABLE	104
#define CT_VEHICLE_DIRECTION	105

// control styles
#define ST_LEFT					0
#define ST_RIGHT				1
#define ST_CENTER				2
#define ST_DOWN					4
#define ST_UP					8
#define ST_VCENTER				12
#define ST_SINGLE				0
#define ST_MULTI				16
#define ST_TITLE_BAR			32
#define ST_PICTURE				48
#define ST_FRAME				64
#define ST_BACKGROUND			80
#define ST_GROUP_BOX			96
#define ST_GROUP_BOX2			112
#define ST_HUD_BACKGROUND		128
#define ST_TILE_PICTURE			144
#define ST_WITH_RECT			160
#define ST_LINE					176
#define ST_UPPERCASE			192
#define ST_LOWERCASE			208
#define ST_ADDITIONAL_INFO		3840
#define ST_SHADOW				256
#define ST_NO_RECT				512
#define ST_KEEP_ASPECT_RATIO	2048
#define ST_TITLE				ST_TITLE_BAR + ST_CENTER
#define SL_VERT					0
#define SL_HORZ					1024
#define SL_TEXTURES				16
#define ST_VERTICAL				1
#define ST_HORIZONTAL			0
#define LB_TEXTURES				16
#define LB_MULTI				32
#define TR_SHOWROOT				1
#define TR_AUTOCOLLAPSE			2

// import parent classes
import RscObject;
import RscText;
import RscFrame;
import RscLine;
import RscProgress;
import RscPicture;
import RscPictureKeepAspect;
import RscVideo;
import RscHTML;
import RscButton;
import RscShortcutButton;
import RscEdit;
import RscCombo;
import RscListBox;
import RscListNBox;
import RscXListBox;
import RscTree;
import RscSlider;
import RscXSliderH;
import RscActiveText;
import RscActivePicture;
import RscActivePictureKeepAspect;
import RscStructuredText;
import RscToolbox;
import RscControlsGroup;
import RscControlsGroupNoScrollbars;
import RscControlsGroupNoHScrollbars;
import RscControlsGroupNoVScrollbars;
import RscButtonTextOnly;
import RscButtonMenu;
import RscButtonMenuOK;
import RscButtonMenuCancel;
import RscButtonMenuSteam;
import RscMapControl;
import RscMapControlEmpty;
import RscCheckBox;

#endif

 

 

 

the dialog will not work because i did not post all used classes but the map classes should show how to do it

Share this post


Link to post
Share on other sites

Yea, it works. But i still can't place markers. I need different script for it, right?

Share this post


Link to post
Share on other sites

Ok, thanks @sarogahtyp, you put me on the spot!! 😂 Luckily though, I've made two separate map controls in my time that both work well. I have a defines.hpp that, among other things, includes this:

 

defines.hpp

Spoiler

class Rsc_MIL_SetupMenuMap 
{ 
	access = 0; 
	idc = 10023; 
	type = CT_MAP_MAIN; 
	style = ST_PICTURE; 
	x = 0.05; y = 0.05; 
	w = 0.90; h = 0.90; 
	texture = "";
	colorBackground[] = {0.969,0.957,0.949,1};
	colorCountlines[] = {0.572,0.354,0.188,0.25};
	colorCountlinesWater[] = {0.491,0.577,0.702,0.3};
	colorForest[] = {0.624,0.78,0.388,0.5};
	colorForestBorder[] = {0,0,0,0};
	colorGrid[] = {0.1,0.1,0.1,0.6};
	colorGridMap[] = {0.1,0.1,0.1,0.6};
	colorInactive[] = {1,1,1,0.5};
	colorLevels[] = {0.286,0.177,0.094,0.5};
	colorMainCountlines[] = {0.572,0.354,0.188,0.5};
	colorMainCountlinesWater[] = {0.491,0.577,0.702,0.6};
	colorMainRoads[] = {0.9,0.5,0.3,1};
	colorMainRoadsFill[] = {1,0.6,0.4,1};
	colorNames[] = {0.1,0.1,0.1,0.9};
	colorOutside[] = {0,0,0,1};
	colorPowerLines[] = {0.1,0.1,0.1,1};
	colorRailWay[] = {0.8,0.2,0,1};
	colorRoads[] = {0.7,0.7,0.7,1};
	colorRoadsFill[] = {1,1,1,1};
	colorRocks[] = {0,0,0,0.3};
	colorRocksBorder[] = {0,0,0,0};
	colorSea[] = {0.467,0.631,0.851,0.5};
	colorText[] = {0,0,0,1};
	colorTracks[] = {0.84,0.76,0.65,0.15};
	colorTracksFill[] = {0.84,0.76,0.65,1};
	alphaFadeStartScale = 1;
	alphaFadeEndScale = 2;
	font = "TahomaB"; sizeEx = 0.040000; 
	fontLabel = "TahomaB"; 
	sizeExLabel = 0.02; 
	fontGrid = "TahomaB"; 
	sizeExGrid = 0.02; 
	fontUnits = "TahomaB"; 
	sizeExUnits = 0.02; 
	fontNames = "TahomaB"; 
	sizeExNames = 0.02; 
	fontInfo = "TahomaB"; 
	sizeExInfo = 0.02; 
	fontLevel = "TahomaB"; 
	sizeExLevel = 0.02; 
	stickX[] = {0.20, {"Gamma", 1.00, 1.50} }; 
	stickY[] = {0.20, {"Gamma", 1.00, 1.50} }; 
	scaleMin = 0.01;
	scaleMax = 1.2;
	ptsPerSquareSea = 6; 
	ptsPerSquareTxt = 8; 
	ptsPerSquareCLn = 8; 
	ptsPerSquareExp = 8; 	
	ptsPerSquareCost = 8; 
	ptsPerSquareFor = "4.0f"; 
	ptsPerSquareForEdge = "10.0f"; 
	ptsPerSquareRoad = 2; 
	ptsPerSquareObj = 10; 
	maxSatelliteAlpha = 0; //1
	text = "";
	showCountourInterval=2; 
	scaleDefault = 0.1; 
	onMouseButtonClick = ""; 
	onMouseButtonDblClick = "";
	widthRailWay = 1;

   	class LineMarker {
	        lineDistanceMin = 3e-005;
	        lineLengthMin = 5;
	        lineWidthThick = 0.014;
	        lineWidthThin = 0.008;
	        textureComboBoxColor = "#(argb,8,8,3)color(1,1,1,1)";
	};

	class ActiveMarker { 
		color[] = {0.30, 0.10, 0.90, 1.00}; 
		size = 50; 
	}; 

	class Bunker { 
		icon = "\A3\ui_f\data\map\mapcontrol\Bunker_CA.paa";
		color[] = {1, 1, 1, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 14; 
		importance = "1.5 * 14 * 0.05"; 
		coefMin = 0.25; 
		coefMax = 4.00; 
	}; 
	class Bush { 
		icon = ""; //\A3\ui_f\data\map\mapcontrol\bush_ca.paa
		color[] = {0.55, 0.64, 0.43, 1.00}; 
		size = 14; 
		importance = "0.2 * 14 * 0.05"; 
		coefMin = 0.25; 
		coefMax = 4.00; 
	}; 
	class BusStop { 
		icon = "\A3\ui_f\data\map\mapcontrol\busstop_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.00, 1.00, 1.00}
		size = 10; 
		importance = "1 * 10 * 0.05"; 
		coefMin = 0.25; 
		coefMax = 4.00; 
	}; 
	class Command { 
		icon = "#(argb,8,8,3)color(1,1,1,1)"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.00, 0.00, 1.00}
		size = 18; 
		importance = 1.00; 
		coefMin = 1.00; 
		coefMax = 1.00; 
	}; 	
	class Chapel { 
		icon = "\A3\ui_f\data\map\mapcontrol\chapel_ca.paa"; 
		color[] = {0, 0, 0, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 16; 
		importance = "1 * 16 * 0.05"; 
		coefMin = 0.90; 
		coefMax = 4.00; 
	}; 
	class Church { 
		icon = "\A3\ui_f\data\map\mapcontrol\church_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 16; 
		importance = "2 * 16 * 0.05"; 
		coefMin = 0.90; 
		coefMax = 4.00; 
	};
	class Cross { 
		icon = "\A3\ui_f\data\map\mapcontrol\cross_ca.paa"; 
		color[] = {0, 0, 0, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 16; 
		importance = "0.7 * 16 * 0.05"; 
		coefMin = 0.25; 
		coefMax = 4.00; 
	};
	class CustomMark {
		icon = "\A3\ui_f\data\map\mapcontrol\cross_ca.paa";
		color[] = {0.55, 0.64, 0.43, 1};
		size = 16;
		importance = 0.7 * 16 * 0.05;
		coefMin = 0.25;
		coefMax = 4;
	};
	class Fortress { 
		icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 16; 
		importance = "2 * 16 * 0.05"; 
		coefMin = 0.25; 
		coefMax = 4.00; 
	}; 
	class Fountain { 
		icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 12; 
		importance = "1 * 12 * 0.05"; 
		coefMin = 0.25; 
		coefMax = 4.00; 
	}; 
	class Fuelstation { 
		icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{1.00, 0.35, 0.35, 1.00}
		size = 16; 
		importance = "2 * 16 * 0.05"; 
		coefMin = 0.75; 
		coefMax = 4.00; 
	}; 	
	class Hospital { 
		icon = "\A3\ui_f\data\map\mapcontrol\hospital_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.78, 0.00, 0.05, 1.00}
		size = 16; 
		importance = "2 * 16 * 0.05"; 
		coefMin = 0.50; 
		coefMax = 4; 
	}; 
	class Lighthouse { 
		icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.78, 0.00, 0.05, 1.00}
		size = 20; 
		importance = "3 * 16 * 0.05"; 
		coefMin = 0.90; 
		coefMax = 4.00; 
	}; 
	class PowerSolar { 
		icon = "\A3\ui_f\data\map\mapcontrol\PowerSolar_CA.paa";
		color[] = {1, 1, 1, 1}; 
		size = 16; 
		importance = "1.5 * 14 * 0.05"; 
		coefMin = 1;
		coefMax = 1;
	}; 
	class PowerWave { 
		icon = "\A3\ui_f\data\map\mapcontrol\PowerWave_CA.paa";
		color[] = {1, 1, 1, 1}; 
		size = 16; 
		importance = "1.5 * 14 * 0.05"; 
		coefMin = 1;
		coefMax = 1;
	}; 
	class PowerWind { 
		icon = "\A3\ui_f\data\map\mapcontrol\PowerWind_CA.paa";
		color[] = {1, 1, 1, 1}; 
		size = 16; 
		importance = "1.5 * 14 * 0.05"; 
		coefMin = 1;
		coefMax = 1;
	}; 
	class Quay { 
		icon = "\A3\ui_f\data\map\mapcontrol\quay_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 16; 
		importance = "2 * 16 * 0.05"; 
		coefMin = 0.50; 
		coefMax = 4.00; 
	};
	class Rock {
		icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa";
		color[] = {0, 0, 0, 1};
		size = 12;
		importance = 0.5 * 12 * 0.05;
		coefMin = 0.25;
		coefMax = 4;
	};
	class Ruin {
		icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa";
		color[] = {1, 1, 1, 1}; //{0.78, 0, 0.05, 1}
		size = 16;
		importance = 1.2 * 16 * 0.05;
		coefMin = 1;
		coefMax = 4;
	};
	class Shipwreck { 
		icon = "\A3\ui_f\data\map\mapcontrol\PowerSolar_CA.paa";
		color[] = {1, 1, 1, 1.00}; 
		size = 16; 
		importance = "1.5 * 14 * 0.05"; 
		coefMin = 1;
		coefMax = 1;
	}; 
	class SmallTree { 
		icon = ""; //\A3\ui_f\data\map\mapcontrol\smalltree_ca.paa
		color[] = {1, 1, 1, 1}; //{0.55, 0.64, 0.43, 1.00}
		size = 12; 
		importance = "0.6 * 12 * 0.05"; 
		coefMin = 0.25; 
		coefMax = 4.00; 
	}; 
	class Stack { 
		icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 20; 
		importance = "2 * 16 * 0.05"; 
		coefMin = 0.90; 
		coefMax = 4.00; 
	}; 
	class Task {
		icon = "\A3\ui_f\data\map\mapcontrol\cross_ca.paa";
		color[] = {0.55, 0.64, 0.43, 1};
		size = 16;
		importance = 0.7 * 16 * 0.05;
		coefMin = 0.25;
		coefMax = 4;
		iconCreated = "#(argb,8,8,3)color(1,1,1,1)";
		iconCanceled = "#(argb,8,8,3)color(0,0,1,1)";
		iconDone = "#(argb,8,8,3)color(0,0,0,1)";
		iconFailed = "#(argb,8,8,3)color(1,0,0,1)";
		colorCreated[] = {1,1,1,1};
		colorCanceled[] = {1,1,1,1};
		colorDone[] = {1,1,1,1};
		colorFailed[] = {1,1,1,1};
	};	
	class Tourism { 
		icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.78, 0.00, 0.05, 1.00}
		size = 16; importance = "1 * 16 * 0.05"; 
		coefMin = 0.70; 
		coefMax = 4.00; 
	}; 
	class Transmitter { 
		icon = "\A3\ui_f\data\map\mapcontrol\transmitter_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 20; 
		importance = "2 * 16 * 0.05"; 
		coefMin = 0.90; 
		coefMax = 4.00; 
	}; 
	class Tree { 
		icon = ""; //\A3\ui_f\data\map\mapcontrol\tree_ca.paa
		color[] = {0.55, 0.64, 0.43, 1.00};
		size = 12; 
		importance = "0.9 * 16 * 0.05"; 
		coefMin = 0.25; 
		coefMax = 4.00; 
	}; 
	class ViewTower { 
		icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 16; 
		importance = "2.5 * 16 * 0.05"; 
		coefMin = 0.50; 
		coefMax = 4.00; 
	}; 
	class Watertower { 
		icon = "\A3\ui_f\data\map\mapcontrol\watertower_ca.paa"; 
		color[] = {1, 1, 1, 1}; //{0.00, 0.35, 0.70, 1.00}
		size = 32; 
		importance = "1.2 * 16 * 0.05"; 
		coefMin = 0.90; 
		coefMax = 4.00;
	}; 
	class Waypoint { 
		icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa"; 
		color[] = {0, 0, 0, 1}; 
		size = 24; 
		importance = 1.00; 
		coefMin = 1.00; 
		coefMax = 1.00; 
	}; 
	class WaypointCompleted { 
		icon = "\A3\ui_f\data\map\mapcontrol\waypointCompleted_ca.paa";
		color[] = {0, 0, 0, 1}; 
		size = 24; 
		importance = 1.00; 
		coefMin = 1.00; 
		coefMax = 1.00; 
	}; 
};

 

 

 

Then I've created a dialog, where the last class is the one that creates the map (idc 1029):

 

dialog.hpp:

Spoiler

class MIL_Kneeboard_1
{
    idd = 51901;
    movingenable = true;
	onLoad = "{((_this select 0) displayCtrl _x) ctrlShow false} forEach [1028,1029]; uiNamespace setVariable ['MIL_CurrentKneeboard_IDD',_this select 0]; player setVariable ['MIL_CurrentKneeboardPage',1]; nul = [0] spawn MIL_fnc_Kneeboard_Manage; ctrlSetFocus ((_this select 0) displayCtrl 1001);";
       
    class Controls
    {
		class MIL_Kneeboard_CAS_Background: Rsc_MIL_RscPicture
		{
			idc = 1000;
			text = "MIL_Kneeboard\pics\CAS_Briefing.jpg"; //--- ToDo: Localize;
			x = 0.005 * safezoneW + safezoneX;
			y = 0.1 * safezoneH + safezoneY;
			w = 0.375 * safezoneW;
			h = 0.9 * safezoneH;
			colorBackground[] = {0,0.2,0,0};
			colorActive[] = {0,0.2,0,0};
		};
		class MIL_Kneeboard_CAS_AircraftCS: Rsc_MIL_Edit
		{
			idc = 1001;
			x = 0.014 * safezoneW + safezoneX;
			y = 0.195 * safezoneH + safezoneY;
			w = 0.09 * safezoneW;
			h = 0.02 * safezoneH;
			style = 2 + 512;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_JTACCS: Rsc_MIL_Edit
		{
			idc = 1002;
			x = 0.139 * safezoneW + safezoneX;
			y = 0.195 * safezoneH + safezoneY;
			w = 0.09 * safezoneW;
			h = 0.02 * safezoneH;
			style = 2 + 512;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line1: Rsc_MIL_Edit
		{
			idc = 1003;
			x = 0.082 * safezoneW + safezoneX;
			y = 0.259 * safezoneH + safezoneY;
			w = 0.285 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Initial Point (fixed-wing) or Battle Position (rotary-wing)"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line2a: Rsc_MIL_Edit
		{
			idc = 1004;
			x = 0.138 * safezoneW + safezoneX;
			y = 0.2925 * safezoneH + safezoneY;
			w = 0.195 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Degrees (0-360) from IP/BP"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line2b: Rsc_MIL_Edit
		{
			idc = 1005;
			x = 0.12 * safezoneW + safezoneX;
			y = 0.327 * safezoneH + safezoneY;
			w = 0.206 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Indicates side of IP/BP line aircraft can manoeuvre in to position for attack"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line3: Rsc_MIL_Edit
		{
			idc = 1006;
			x = 0.178 * safezoneW + safezoneX;
			y = 0.3605 * safezoneH + safezoneY;
			w = 0.189 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "IP accuracy to 0.1km, BP accuracy to 5m"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line4: Rsc_MIL_Edit
		{
			idc = 1007;
			x = 0.174 * safezoneW + safezoneX;
			y = 0.3945 * safezoneH + safezoneY;
			w = 0.194 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Target elevation above sea level, in meters"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line5: Rsc_MIL_Edit
		{
			idc = 1008;
			x = 0.14 * safezoneW + safezoneX;
			y = 0.4285 * safezoneH + safezoneY;
			w = 0.228 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Description should be accurate, concise and specific enough to allow easy recognition"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line6: Rsc_MIL_Edit
		{
			idc = 1009;
			x = 0.188 * safezoneW + safezoneX;
			y = 0.4620 * safezoneH + safezoneY;
			w = 0.18 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "If visual, make use of reference points that will be obvious to air crew"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line7: Rsc_MIL_Edit
		{
			idc = 1010;
			x = 0.153 * safezoneW + safezoneX;
			y = 0.4965 * safezoneH + safezoneY;
			w = 0.215 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Smoke, illum, IR pointer, tracer, etc. If using laser, include code and laser-to-target line (degrees)"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line8: Rsc_MIL_Edit
		{
			idc = 1011;
			x = 0.232 * safezoneW + safezoneX;
			y = 0.5305 * safezoneH + safezoneY;
			w = 0.136 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "If friendly position is marked, include type of mark"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Line9: Rsc_MIL_Edit
		{
			idc = 1012;
			x = 0.116 * safezoneW + safezoneX;
			y = 0.5645 * safezoneH + safezoneY;
			w = 0.252 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "4 or 8 (semi-cardinal) point direction (e.g. N, North, SE, South East)"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Remarks1: Rsc_MIL_Edit
		{
			idc = 1013;
			x = 0.115 * safezoneW + safezoneX;
			y = 0.6295 * safezoneH + safezoneY;
			w = 0.252 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Anything, incl. threats/weather/visibility/TiC/desired ordinance/friendly support (e.g. SEAD)"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Remarks2: Rsc_MIL_Edit
		{
			idc = 1014;
			x = 0.014 * safezoneW + safezoneX;
			y = 0.6610 * safezoneH + safezoneY;
			w = 0.353 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Anything, incl. threats/weather/visibility/TiC/desired ordinance/friendly support (e.g. SEAD)"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_Remarks3: Rsc_MIL_Edit
		{
			idc = 1015;
			x = 0.014 * safezoneW + safezoneX;
			y = 0.6925 * safezoneH + safezoneY;
			w = 0.353 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Anything, incl. threats/weather/visibility/TiC/desired ordinance/friendly support (e.g. SEAD)"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_FAH: Rsc_MIL_Edit
		{
			idc = 1016;
			x = 0.123 * safezoneW + safezoneX;
			y = 0.7820 * safezoneH + safezoneY;
			w = 0.245 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "For off-axis weapons, if FAH differs from aircraft heading at release, inform JTAC"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_ACA1: Rsc_MIL_Edit
		{
			idc = 1017;
			x = 0.184 * safezoneW + safezoneX;
			y = 0.8160 * safezoneH + safezoneY;
			w = 0.184 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Position, area and altitudes of ACAs"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_ACA2: Rsc_MIL_Edit
		{
			idc = 1018;
			x = 0.014 * safezoneW + safezoneX;
			y = 0.8480 * safezoneH + safezoneY;
			w = 0.353 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Position, area and altitudes of ACAs"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_DangerClose: Rsc_MIL_Edit
		{
			idc = 1019;
			x = 0.133 * safezoneW + safezoneX;
			y = 0.8805 * safezoneH + safezoneY;
			w = 0.235 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Any positions/marks of friendlies in close proximity to target"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_ToT: Rsc_MIL_Edit
		{
			idc = 1020;
			x = 0.098 * safezoneW + safezoneX;
			y = 0.9145 * safezoneH + safezoneY;
			w = 0.270 * safezoneW;
			h = 0.02 * safezoneH;
			tooltip = "Specific time the ordinance will impact target"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_TtTa: Rsc_MIL_Edit
		{
			idc = 1021;
			x = 0.166 * safezoneW + safezoneX;
			y = 0.9605 * safezoneH + safezoneY;
			w = 0.08 * safezoneW;
			h = 0.02 * safezoneH;
			style = 2 + 512;
			tooltip = "Time in minutes plus seconds until ordinance is to impact target. Countdown is started with the word HACK"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		class MIL_Kneeboard_CAS_TtTb: Rsc_MIL_Edit
		{
			idc = 1022;
			x = 0.265 * safezoneW + safezoneX;
			y = 0.9605 * safezoneH + safezoneY;
			w = 0.08 * safezoneW;
			h = 0.02 * safezoneH;
			style = 2 + 512;
			tooltip = "Time in minutes plus seconds until ordinance is to impact target. Countdown is started with the word HACK"; //--- ToDo: Localize;
			onSetFocus = "uiNamespace setVariable ['MIL_Kneeboard_LastIDC',ctrlIDC (_this select 0)];";
		};
		
		class MIL_Kneeboard_Button_Prev: Rsc_MIL_Button
		{
			idc = 1023;
			x = 0.01 * safezoneW + safezoneX;
			y = 0.11 * safezoneH + safezoneY;
			w = 0.025 * safezoneW;
			h = 0.025 * safezoneH;
			text = "Prev"; //--- ToDo: Localize;
			tooltip = "Previous kneeboard page"; //--- ToDo: Localize;
			action = "nul = [1] spawn MIL_fnc_Kneeboard_Manage;";
		};
		class MIL_Kneeboard_Button_Next: Rsc_MIL_Button
		{
			idc = 1024;
			x = 0.04 * safezoneW + safezoneX;
			y = 0.11 * safezoneH + safezoneY;
			w = 0.025 * safezoneW;
			h = 0.025 * safezoneH;
			text = "Next"; //--- ToDo: Localize;
			tooltip = "Next kneeboard page"; //--- ToDo: Localize;
			action = "nul = [2] spawn MIL_fnc_Kneeboard_Manage;";
		};
		class MIL_Kneeboard_Button_Close: Rsc_MIL_Button
		{
			idc = 1025;
			x = 0.07 * safezoneW + safezoneX;
			y = 0.11 * safezoneH + safezoneY;
			w = 0.03 * safezoneW;
			h = 0.025 * safezoneH;
			text = "Close"; //--- ToDo: Localize;
			tooltip = "Hide kneeboard"; //--- ToDo: Localize;
			action = "nul = [3] spawn MIL_fnc_Kneeboard_Manage;";
		};
		class MIL_Kneeboard_Button_Map: Rsc_MIL_Button
		{
			idc = 1026;
			x = 0.3 * safezoneW + safezoneX;
			y = 0.11 * safezoneH + safezoneY;
			w = 0.0225 * safezoneW;
			h = 0.025 * safezoneH;
			text = "Map"; //--- ToDo: Localize;
			tooltip = "Open/close map"; //--- ToDo: Localize;
			action = "nul = [4] spawn MIL_fnc_Kneeboard_Manage;";
		};
		class MIL_Kneeboard_Button_Clear: Rsc_MIL_Button
		{
			idc = 1027;
			x = 0.335 * safezoneW + safezoneX;
			y = 0.11 * safezoneH + safezoneY;
			w = 0.03 * safezoneW;
			h = 0.025 * safezoneH;
			text = "Clear"; //--- ToDo: Localize;
			tooltip = "Clear proforma"; //--- ToDo: Localize;
			action = "nul = [5] spawn MIL_fnc_Kneeboard_Manage;";
		};
		class MIL_Kneeboard_Map_Background: Rsc_MIL_RscPicture
		{
			idc = 1028;
			text = "#(argb,8,8,3)color(0.969,0.957,0.949,1)"; //#(argb,8,8,3)color(0,0,0,1)
			x = 0.415 * safezoneW + safezoneX;
			y = 0.12 * safezoneH + safezoneY;
			w = 0.56 * safezoneW;
			h = 0.8 * safezoneH;
			colorBackground[] = {0,0.2,0,0.8};
			colorActive[] = {0,0.2,0,0.8};
		};
		class MIL_Kneeboard_Map: Rsc_MIL_SetupMenuMap
		{
			idc = 1029;
			text = ""; //#(argb,8,8,3)color(0,0,0,1)
			x = 0.415 * safezoneW + safezoneX;
			y = 0.12 * safezoneH + safezoneY;
			w = 0.56 * safezoneW;
			h = 0.8 * safezoneH;
			colorBackground[] = {0,0.2,0,0.8};
			colorActive[] = {0,0.2,0,0.8};
			onMouseButtonClick = "nul = _this spawn MIL_fnc_Kneeboard_DeleteMarker;";
			onMouseButtonDblClick = "nul = _this spawn MIL_fnc_Kneeboard_CreateMarker;";
		};
	};
};

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

@beno_83au its a full working map dialog with key handles? I tried to find standard Arma 3 map-related features, but it didn't work for me and I'm already thinking that this is not a very good idea = D

Share this post


Link to post
Share on other sites
On 8/19/2021 at 5:38 PM, sarogahtyp said:

Idk how to enable that feature with the map classes. Maybe @beno_83au knows?

 

But you can still use an event handler to detect map clicks and add markers via script with it...

 

Edit:

https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#MapSingleClick

Thats right, but i didn't found a bis function, which do that

Share this post


Link to post
Share on other sites

I added my own key pressed event handlers. This is where I've taken my example from, in case you want to see it in action:

But I had to add my own handlers for creating and deleting markers. 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×