DialogControls-Menu: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
Line 61: Line 61:
'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. '''
'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. '''


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" |
{| border="1" align="left" cellpadding="3" cellspacing="0" |
! colspan="3" bgcolor="#bbbbff" | Properties
! colspan="3" bgcolor="#bbbbff" | Properties
Line 67: Line 68:
! bgcolor="#ddddff" | Type
! bgcolor="#ddddff" | Type
! bgcolor="#ddddff" | Remark
! 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">
|}<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:'''
* '''Example:'''
<code><nowiki></nowiki></code>
<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==
==CT_MENU_STRIP=47==

Revision as of 23:09, 1 April 2019

Template:Stub

CT_CONTEXT_MENU=14

TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here.

Control with unknown application. It is used for the waypoint editing in the UAV terminal but is not reproducable in other displays.

Properties
Name Type Remark
colorBorder color array
colorSeperator color array
colorSelectBackground color array
colorChecked color array


  • Example:

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

TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here.

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


class Entry (Anything)

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:

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

TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here.

Properties
Name Type Remark


  • Example: