DialogControls-Menu: Difference between revisions
m (visual tweaks (not done yet)) |
|||
Line 1: | Line 1: | ||
{{ | {{Informative|TokenNames common to most controls, such as x, y, w, h, text, idc... are not listed here.}} | ||
==CT_CONTEXT_MENU=14== | ==CT_CONTEXT_MENU=14== | ||
[[File:a3 ct context menu.jpg|thumb|Context menu in the UAV terminal display]] | [[File:a3 ct context menu.jpg|thumb|Context menu in the UAV terminal display]] | ||
Line 8: | Line 6: | ||
<tt> Do not create it this way</tt> | <tt> Do not create it this way</tt> | ||
{| border="1" align="left" cellpadding="3" cellspacing="0" | | {| class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" | | ||
! colspan="3" bgcolor="#bbbbff" | Properties | ! colspan="3" bgcolor="#bbbbff" | Properties | ||
|- | |- | ||
Line 33: | Line 31: | ||
|}<br clear="all"> | |}<br clear="all"> | ||
* '''Example:''' | * '''Example Config:''' | ||
<code><nowiki> | <code><nowiki> | ||
class RscDisplayUavTerminalWaypointMenu | class RscDisplayUavTerminalWaypointMenu | ||
Line 63: | Line 61: | ||
==CT_MENU=46== | ==CT_MENU=46== | ||
[[File:a3 ct menu.jpg|thumb|3den right click menu]] | [[File:a3 ct menu.jpg|thumb|3den right click menu]] | ||
3den 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. | 3den 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. | ||
{| border="1" align="left" cellpadding="3" cellspacing="0" | | {|class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" | | ||
! colspan="3" bgcolor="#bbbbff" | Properties | ! colspan="3" bgcolor="#bbbbff" | Properties | ||
|- | |- | ||
Line 116: | Line 112: | ||
First entry is an <tt>items[]</tt> 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. | First entry is an <tt>items[]</tt> 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. | ||
{| border="1" align="left" cellpadding="3" cellspacing="0" | | {|class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" | | ||
! colspan="3" bgcolor="#bbbbff" | Properties | ! colspan="3" bgcolor="#bbbbff" | Properties | ||
|- | |- | ||
Line 129: | Line 125: | ||
====Custom Items Class==== | ====Custom Items Class==== | ||
{| border="1" align="left" cellpadding="3" cellspacing="0" | | {|class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" | | ||
! colspan="3" bgcolor="#bbbbff" | Properties | ! colspan="3" bgcolor="#bbbbff" | Properties | ||
|- | |- | ||
Line 150: | Line 146: | ||
* '''Example:''' | * '''Example Config:''' | ||
<code><nowiki> | <code><nowiki> | ||
class ContextMenu | class ContextMenu | ||
Line 216: | Line 212: | ||
==CT_MENU_STRIP=47== | ==CT_MENU_STRIP=47== | ||
[[File:a3 ct menu strip.jpg|thumb|[[Eden Editor]] menu strip expanded to the second level]] | [[File:a3 ct menu strip.jpg|thumb|[[Eden Editor]] menu strip expanded to the second level]] | ||
The top bar of [[Eden Editor]] containing entries like "Scenario", "Edit", "View", etc. In contrary to the other menu types it is fully functional on custom displays. | The top bar of [[Eden Editor]] containing entries like "Scenario", "Edit", "View", etc. In contrary to the other menu types it is fully functional on custom displays. | ||
{| border="1" align="left" cellpadding="3" cellspacing="0" | | {|class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" | | ||
! colspan="3" bgcolor="#bbbbff" | Properties | ! colspan="3" bgcolor="#bbbbff" | Properties | ||
|- | |- | ||
Line 256: | Line 250: | ||
===class Items=== | ===class Items=== | ||
First entry is an <tt>items[]</tt> array listing all entry classes. Afterwards come the entry classes themselves. There has to be a Default class. | First entry is an <tt>items[]</tt> array listing all entry classes. Afterwards come the entry classes themselves. There has to be a Default class. | ||
{| border="1" align="left" cellpadding="3" cellspacing="0" | | {|class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" | | ||
! colspan="3" bgcolor="#bbbbff" | Properties | ! colspan="3" bgcolor="#bbbbff" | Properties | ||
|- | |- | ||
Line 269: | Line 263: | ||
====Custom Items Class==== | ====Custom Items Class==== | ||
{| border="1" align="left" cellpadding="3" cellspacing="0" | | {|class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" | | ||
! colspan="3" bgcolor="#bbbbff" | Properties | ! colspan="3" bgcolor="#bbbbff" | Properties | ||
|- | |- | ||
Line 291: | Line 285: | ||
{{Informative|Above attributes will only work for entries of the second level.}} | {{Informative|Above attributes will only work for entries of the second level.}} | ||
* '''Example:''' | * '''Example Config:''' | ||
<syntaxhighlight lang="cpp">class MenuStrip | <syntaxhighlight lang="cpp">class MenuStrip | ||
{ | { | ||
Line 381: | Line 375: | ||
};</syntaxhighlight> | };</syntaxhighlight> | ||
* '''Example:''' | * '''Example Config:''' | ||
<syntaxhighlight lang="cpp">class RscMenuStrip | <syntaxhighlight lang="cpp">class RscMenuStrip | ||
{ | { |
Revision as of 18:32, 18 February 2020
CT_CONTEXT_MENU=14
Control with unknown application. It is used for the waypoint editing in the UAV terminal but is not reproducable in other displays. When creating it either by config or ctrlCreate command the following rpt error is logged:
Do not create it this way
Properties | ||
---|---|---|
Name | Type | Remark |
colorBorder | color array | |
colorSeperator | color array | |
colorSelectBackground | color array | |
colorChecked | color array |
- Example Config:
class RscDisplayUavTerminalWaypointMenu
{
idc=108;
type=CT_CONTEXT_MENU;
font="RobotoCondensed";
sizeEx="0.028*SafezoneH";
style=0;
colorBackground[]={0,0,0,0.5};
colorBorder[]={0,0,0,0};
colorSeparator[]={0.94999999,0.94999999,0.94999999,1};
colorSelectBackground[]={1,1,1,0.30000001};
colorChecked[]=
{
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"
};
colorEnabled[]={1,1,1,1};
colorDisabled[]={1,1,1,0.25};
x=0;
y=0;
w=0;
h=0;
};
CT_MENU=46
3den 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.
Properties | ||
---|---|---|
Name | Type | Remark |
items | class | |
arrow | String | Path to .paa file or procedural texture |
rowHeight | Number | |
itemSpacingW | Number | |
itemSpacingH | Number | |
pictureCheckboxEnabled | Path to .paa file or procedural texture | |
pictureCheckboxDisabled | Path to .paa file or procedural texture | |
pictureRadioEnabled | Path to .paa file or procedural texture | |
pictureRadioDisabled | Path to .paa file or procedural texture |
class Items
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 |
- Example Config:
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;
};
};
};
CT_MENU_STRIP=47
The top bar of Eden Editor containing entries like "Scenario", "Edit", "View", etc. In contrary to the other menu types it is fully functional on custom displays.
Properties | ||
---|---|---|
Name | Type | Remark |
Items | class | Same as CT_MENU |
colorStripBackground | color array | |
colorStripText | color array | |
colorStripSelect | color array | |
colorStripSelectBackground | color array | |
colorStripDisabled | color array |
class Items
First entry is an items[] array listing all entry classes. Afterwards come the entry classes themselves. There has to be a Default class.
Properties | ||
---|---|---|
Name | Type | Remark |
Entry | class | Name can be anything |
Custom Items Class
Properties | ||
---|---|---|
Name | Type | Remark |
text | String | Name of the entry |
action | String | Code executed when entry is clicked |
opensNewWindow | Number | If 1, "..." is added to the text property, indicating that a new display will be opened |
picture | String | Path to picture shown left of the text property |
weblink | String | URL to a web page. Page will be opened in the default web browser |
shortCuts | Array | List of shortcuts which is shown right of the text property (Shortcut itself seems to have no function, needs further investigation) |
- Example Config:
class MenuStrip
{
idc=120;
type=CT_MENU_STRIP;
colorStripBackground[]={0,0,0,1};
colorStripText[]={1,1,1,1};
colorStripSelect[]={0,0,0,1};
colorStripSelectBackground[]=
{
"(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
};
colorStripDisabled[]={1,1,1,0.25};
x="safezoneX";
y="safezoneY";
w="safezoneW - 5 * (pixelW * pixelGrid * 0.50)";
h="5 * (pixelH * pixelGrid * 0.50)";
colorStripBackground[]={0,0,0,0};
colorBackground[]={0.1,0.1,0.1,1};
font="RobotoCondensedLight";
colorBorder[]={0,0,0,0};
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",
"entry3",
};
class entry1
{
text="First Entry";
items[]=
{
"sub1_1",
"sub1_2"
};
};
class sub1_1
{
text="First Sub Entry";
action= systemchat ""Sub entry one."";";
};
class sub1_2
{
text="Second Sub Entry";
};
class entry2
{
text="Entry 2, no sub menu";
action="systemchat ""Entry 2."";";
};
class entry3
{
text="Fancy entry 3";
action ="systemchat ""Entry 3."";";
data="CustomData";
shortcuts[]=
{
"512 + 0x31" // STRG+N
};
picture="\a3\3DEN\Data\Displays\Display3DEN\ToolBar\new_ca.paa";
};
};
};
- Example Config:
class RscMenuStrip
{
idd = -1;
movingEnable = true;
enableSimulation = true;
onLoad = "";
onUnload = "";
class Controls
{
class MenuStrip: ctrlMenuStrip
{
idc = 1000;
x = safeZoneX;
y = (safeZoneY + (safezoneH * 0.132));
w = safezoneW;
h = (safezoneH * 0.03);
class Items
{
items[] = //First Level Entries, when editing an existing menu strip, one can use the += operator to add new entries without overwriting the old ones
{
"Menu1",
"Menu2"
};
class Menu1
{
text = "Menu 1";
items[] = //Second Level Entries
{
"WebLink"
};
};
class Menu2
{
text = "Menu 2";
items[] = //Second Level Entries
{
"SayHello",
"PlayMusic"
};
};
class WebLink
{
text = "Go to Arma 3 Webpage"; //Display name of menu entry
picture = "\A3\Ui_f\data\Logos\arma3_white_ca.paa"; //Picture shown in front of text
weblink = "https://arma3.com/"; //Opens a web page in default webbrowser
opensNewWindow = 1; //Adds ... after text, indicating that this menu entry will open a new display
};
class SayHello
{
text = "Say Hello";
action = "systemChat 'Hello World!'"; //Code executed when entry is clicked
};
class PlayMusic
{
text = "Play Music";
picture = "\a3\Modules_F_Curator\Data\portraitMusic_ca.paa";
action = "playMusic 'Track15_MainTheme'";
};
class Default //Default entries, otherwise error is shown upon creation of the display (Needs further investigation)
{
text = "Default";
};
};
};
};
};