DialogControls-Menu: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (disamb)
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Stub}}
{{Wiki|disamb}}
==CT_CONTEXT_MENU=14==
'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. '''


[[File:a3_ct_context_menu.jpg]]
* [[CT_MENU]]
 
* [[CT_MENU_STRIP]]
Control with unknown application. It is used for the waypoint editing in the UAV terminal but is not reproducable in other displays.
* [[CT_CONTEXT_MENU]]
{| border="1" align="left" cellpadding="3" cellspacing="0" |
! colspan="3" bgcolor="#bbbbff" | Properties
|-
! bgcolor="#ddddff" | Name
! bgcolor="#ddddff" | Type
! bgcolor="#ddddff" | Remark
|-
| colorBorder
| color array
|
|-
| colorSeperator
| color array
|
|-
| colorSelectBackground
| color array
|
|-
| colorChecked
| color array
|
|-
|}<br clear="all">
 
* '''Example:'''
<code><nowiki>
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;
};
</nowiki></code>
 
==CT_MENU=46==
'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. '''
 
[[File:a3_ct_menu.jpg]]
 
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" |
! colspan="3" bgcolor="#bbbbff" | Properties
|-
! bgcolor="#ddddff" | Name
! bgcolor="#ddddff" | Type
! bgcolor="#ddddff" | 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
|
|-
|}<br clear="all">
 
===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. See [[Eden_Editor:_Entity_Context_Menu|Eden Editor: Entity Context Menu]] for more information.
 
{| 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">
 
====class Entry (Anything)====
{| 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">
 
 
* '''Example:'''
<code><nowiki>
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;
};
};
};
</nowiki></code>
 
==CT_MENU_STRIP=47==
'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. '''
 
[[File:a3 ct menu strip.jpg|thumb|3den menu strip expanded to the second level]]
 
The top bar of 3den 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" |
! colspan="3" bgcolor="#bbbbff" | Properties
|-
! bgcolor="#ddddff" | Name
! bgcolor="#ddddff" | Type
! bgcolor="#ddddff" | Remark
|-
| Items
| class
| Same as CT_MENU
|-
| colorStripBackground
| color array
|
|-
| colorStripText
| color array
|
|-
| colorStripSelect
| color array
|
|-
| colorStripSelectBackground
| color array
|
|-
| colorStripDisabled
| color array
|
|}<br clear="all">
 
* '''Example:'''
<code><nowiki>
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";
};
};
};
</nowiki></code>
 
[[Category: Dialogs]]

Latest revision as of 14:38, 7 February 2021

Disambiguation
This disambiguation page lists articles associated with the same title.