DialogControls-Menu: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (→‎CT_CONTEXT_MENU=14: rpt error when created)
(One intermediate revision by the same user not shown)
Line 3: Line 3:
'''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. '''


[[File:a3_ct_context_menu.jpg]]
[[File:a3 ct context menu.jpg|thumb|Context menu in the UAV terminal display]]


Control with unknown application. It is used for the waypoint editing in the UAV terminal but is not reproducable in other displays.
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:
 
<tt> Do not create it this way</tt>
{| 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

Revision as of 18:10, 2 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.

Context menu in the UAV terminal display

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:

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 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.

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.

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.

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


  • Example:

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