CT MENU: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(redirected to DialogControls-Menu)
 
(page overhaul)
Tag: Removed redirect
Line 1: Line 1:
#redirect [[DialogControls-Menu]]
{{CT|intro
|macro = CT_MENU
|value = 46
|description = [[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.
|gallery=File:a3 ct menu.jpg{{!}}[[Eden Editor]] right click menu
|commands =
* [[:Category:Command_Group:_GUI_Control_-_Menu|Commands: Menu]]
|events =
}}
 
{{CT|abc start}}
=== A ===
{{CT|attribute
|name=arrow
|type1=String
|value1=""
|description=Path to .paa file or procedural texture.
}}
=== I ===
{{CT|attribute
|name=itemSpacingH
|type1=Number
|value1=0
|description=
}}
 
{{CT|attribute
|name=itemSpacingW
|type1=Number
|value1=0
|description=
}}
 
{{CT|attribute
|name=Items
|type1=Class
|value1=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;
};
};
|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.
 
{{{!}}class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" {{!}}
! colspan="3" bgcolor="#bbbbff" {{!}} Properties
{{!}}-
! bgcolor="#ddddff" {{!}} Name
! bgcolor="#ddddff" {{!}} Type
! bgcolor="#ddddff" {{!}} Remark
{{!}}-
{{!}} Entry
{{!}} class
{{!}} Name can be anything
{{!}}}<br clear="all">
 
'''Custom Items Class'''
{{{!}}class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" {{!}}
! colspan="3" bgcolor="#bbbbff" {{!}} Properties
{{!}}-
! bgcolor="#ddddff" {{!}} Name
! bgcolor="#ddddff" {{!}} Type
! bgcolor="#ddddff" {{!}} Remark
{{!}}-
{{!}} text
{{!}} string
{{!}}
{{!}}-
{{!}} action
{{!}} string
{{!}} Has to contain valid sqf command(s)
{{!}}-
{{!}} conditionShow
{{!}} string
{{!}} [[Simple Expression]]. Refer to [[Eden_Editor:_Entity_Context_Menu{{!}}Eden Editor: Entity Context Menu]]
{{!}}}<br clear="all">
}}
 
=== P ===
{{CT|attribute
|name=pictureCheckboxEnabled
|type1=String
|value1=""
|description=Path to .paa file or procedural texture.
}}
 
{{CT|attribute
|name=pictureCheckboxDisabled
|type1=String
|value1=""
|description=Path to .paa file or procedural texture.
}}
 
 
{{CT|attribute
|name=pictureRadioEnabled
|type1=String
|value1=""
|description=Path to .paa file or procedural texture.
}}
 
{{CT|attribute
|name=pictureRadioDisabled
|type1=String
|value1=""
|description=Path to .paa file or procedural texture.
}}
 
=== R ===
{{CT|attribute
|name=rowHeight
|type1=Number
|value1=0.025
|description=
}}
 
{{CT|abc end}}
 
{{CT|examples}}
 
None
 
== Other Examples ==
<syntaxhighlight lang="cpp">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;
};
};
};</syntaxhighlight>

Revision as of 14:34, 29 November 2020

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;
		};
	};
};