CT MENU: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (link to ct context menu)
m (Text replacement - "{{Inline code|" to "{{ic|")
Line 68: Line 68:
};
};
};
};
|description=First entry is an {{Inline code|items[]}} array listing all entry classes. Afterwards come the entry classes themselves. There has to be a Default class. See [[Eden_Editor:_Entity_Context_Menu|Eden Editor: Entity Context Menu]] for more information.
|description=First entry is an {{ic|items[]}} array listing all entry classes. Afterwards come the entry classes themselves. There has to be a Default class. See [[Eden_Editor:_Entity_Context_Menu|Eden Editor: Entity Context Menu]] for more information.


{{{!}}class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" {{!}}
{{{!}}class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" {{!}}

Revision as of 18:11, 27 February 2021


Introduction

Eden Editor context menu which is opened with right click. Same problems as CT_CONTEXT_MENU. When created as part of class controls it is visible and functional until clicked on/clicked on another part of the display and thereupon deleted. When listed as an independed class similar to controls and controlsBackground, like in 3den, it is not created at all. Also, the menu commands (menuAdd, menuSize, etc) don't seem to work on it.

Related commands & functions

Related User Interface Eventhandlers

Alphabetical Order

TokenNames common to most controls, such as x, y, w, h, text, idc... can be found here.
Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with this config crawler.
#define CT_MENU 46


A

arrow

Type
String
Description
Path to .paa file or procedural texture.
arrow = "";

I

itemSpacingH

Type
Number
Description
n/a
itemSpacingH = 0;


itemSpacingW

Type
Number
Description
n/a
itemSpacingW = 0;


Items

Type
Class
Description
First entry is an items[] array listing all entry classes. Afterwards come the entry classes themselves. There has to be a Default class. See Eden Editor: Entity Context Menu for more information.
Properties
Name Type Remark
Entry class Name can be anything

Custom Items Class

Properties
Name Type Remark
text string
action string Has to contain valid sqf command(s)
conditionShow string Simple Expression. Refer to Eden Editor: Entity Context Menu

class Items
{
	items[]=
	{
		"entry1",
		"entry2"
	};
	class Separator
	{
		value=0;
	};
	class entry1
	{
		text = "My first entry";
		action = "systemchat ""Selected first entry."";";
		conditionShow="hoverObject";
	};
	class entry2
	{
		text = "My second entry";
		action = "systemchat ""Selected second entry."";";
		conditionShow="1";
	};
	class Default
	{
		text="";
		data="Empty";
		enable=0;
	};
};


P

pictureCheckboxEnabled

Type
String
Description
Path to .paa file or procedural texture.
pictureCheckboxEnabled = "";


pictureCheckboxDisabled

Type
String
Description
Path to .paa file or procedural texture.
pictureCheckboxDisabled = "";



pictureRadioEnabled

Type
String
Description
Path to .paa file or procedural texture.
pictureRadioEnabled = "";


pictureRadioDisabled

Type
String
Description
Path to .paa file or procedural texture.
pictureRadioDisabled = "";


R

rowHeight

Type
Number
Description
n/a
rowHeight = 0.025;



Default Classes

Arma 3
AddOns: Classes need to be initialised first with class SomeClass;

Missions: Since Arma 3 v2.02 one can use import SomeClass; to initialise a class (see the import keyword).

In older versions, use "Default" call BIS_fnc_exportGUIBaseClasses; and paste the result into the description.ext.


None

Other Examples

class ContextMenu
{
	idc=1100;
	type=CT_MENU;
	shadow=1;
	sizeEx="4.32 * (1 / (getResolution select 3)) * pixelGrid * 0.5";
	font="RobotoCondensedLight";
	colorBorder[]={0,0,0,0};
	colorBackground[]={0.1,0.1,0.1,1};
	colorText[]={1,1,1,1};
	colorSelect[]={0,0,0,1};
	colorSelectBackground[]=
	{
		"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])",
		"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])",
		"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])",
		1
	};
	colorDisabled[]={1,1,1,0.25};
	colorPicture[]={1,1,1,1};
	colorPictureSelect[]={0,0,0,1};
	colorPictureDisabled[]={1,1,1,0.5};
	arrow="\a3\3DEN\Data\Controls\ctrlMenu\arrow_ca.paa";
	rowHeight=0;
	itemSpacingW=0.0099999998;
	itemSpacingH=0.0099999998;
	pictureCheckboxEnabled="\a3\3DEN\Data\Controls\CtrlMenu\pictureCheckboxEnabled_ca.paa";
	pictureCheckboxDisabled="#(argb,8,8,3)color(0,0,0,0)";
	pictureRadioEnabled="\a3\3DEN\Data\Controls\CtrlMenu\pictureRadioEnabled_ca.paa";
	pictureRadioDisabled="#(argb,8,8,3)color(0,0,0,0)";
	class Items
	{
		items[]=
		{
			"entry1",
			"entry2"
		};
		class Separator
		{
			value=0;
		};
		class entry1
		{
			text = "My first entry";
			action = "systemchat ""Selected first entry."";";
			conditionShow="hoverObject";
		};
		class entry2
		{
			text = "My second entry";
			action = "systemchat ""Selected second entry."";";
			conditionShow="1";
		};
		class Default
		{
			text="";
			data="Empty";
			enable=0;
		};
	};
};