CT MENU: Difference between revisions
(redirected to DialogControls-Menu) |
(page overhaul) Tag: Removed redirect |
||
Line 1: | Line 1: | ||
# | {{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 13:34, 29 November 2020
Control Types / MACRO (TYPE VALUE) | |
---|---|
Text/Image/Video |
CT_STATIC (0) | CT_EDIT (2) | CT_HTML (9) | CT_STRUCTURED_TEXT (13) |
Buttons |
CT_BUTTON (1) | CT_ACTIVETEXT (11) | CT_SHORTCUTBUTTON (16) | CT_CHECKBOX (77) | CT_XBUTTON (41) |
Lists |
CT_COMBO (4) | CT_TOOLBOX (6) | CT_CHECKBOXES (7) | CT_TREE (12) | CT_CONTROLS_TABLE (19) | CT_XCOMBO (44) | CT_LISTBOX (5) | CT_LISTNBOX (102) | CT_LISTNBOX_CHECKABLE (104) | CT_XLISTBOX (45) |
3D Objects |
CT_OBJECT (80) | CT_OBJECT_ZOOM (81) | CT_OBJECT_CONTAINER (82) | CT_OBJECT_CONT_ANIM (83) |
Maps |
CT_MAP (100) | CT_MAP_MAIN (101) |
Meta |
CT_SLIDER (3) | CT_XSLIDER (43) | CT_PROGRESS (8) | CT_CONTROLS_GROUP (15) | CT_WEBBROWSER (106) | CT_EXTENSION (107) |
Menu |
CT_CONTEXT_MENU (14) | CT_MENU (46) | CT_MENU_STRIP (47) |
Unknown |
CT_STATIC_SKEW (10) | CT_HITZONES (17) | CT_VEHICLETOGGLES (18) | CT_XKEYDESC (40) | CT_ANIMATED_TEXTURE (45) | CT_LINEBREAK (98) | CT_USER (99) | CT_ITEMSLOT (103) | CT_VEHICLE_DIRECTION (105) |
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
#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
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;
};
};
};