{"name":"CT CONTEXT MENU","title":"CT CONTEXT MENU","type":"topic","url":"https://community.bistudio.com/wiki/CT_CONTEXT_MENU","revid":352167,"updated":"2024-02-01T23:25:31Z","aliases":[],"markdown":"### Introduction\n\n> [!WARNING]\n> 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:\n> **Do not create it this way**\n\n#### Related commands & functions\n\n- Commands: General\n- Commands: UI Eventhandlers\n\n#### Related User Interface Eventhandlers\n\n- Events: General\n\n### Alphabetical Order\n\n> [!NOTE]\n> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found **here**.\n\n> [!WARNING]\n> Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with [this](https://github.com/7erra/BIKI.VR/blob/master/fnc/generateCTPage.sqf) config crawler.\n\n```cpp\n#define CT_CONTEXT_MENU 14\n```\n\n### Default Classes\n\n> [!NOTE]\n> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`\n>\n> ---\n>\n> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the import keyword).\n>\n> In older versions, use `\"Default\" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the description.ext.\n\nThere are no base classes for this control type.\n\n### Other Examples\n\nThe following control class is exported from the Arma 3 config.\n\n```cpp\nclass RscDisplayUavTerminalWaypointMenu\n{\n    idc=108;\n    type=CT_CONTEXT_MENU;\n    font=\"RobotoCondensed\";\n    sizeEx=\"0.028*SafezoneH\";\n    style=0;\n    colorBackground[]={0,0,0,0.5};\n    colorBorder[]={0,0,0,0};\n    colorSeparator[]={0.94999999,0.94999999,0.94999999,1};\n    colorSelectBackground[]={1,1,1,0.30000001};\n    colorChecked[]=\n    {\n        \"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])\",\n        \"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])\",\n        \"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])\",\n        \"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])\"\n    };\n    colorEnabled[]={1,1,1,1};\n    colorDisabled[]={1,1,1,0.25};\n    x=0;\n    y=0;\n    w=0;\n    h=0;\n};\n```","sections":[{"heading":"Introduction","level":3,"markdown":"> [!WARNING]\n> 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:\n> **Do not create it this way**"},{"heading":"Related commands & functions","level":4,"markdown":"- Commands: General\n- Commands: UI Eventhandlers"},{"heading":"Related User Interface Eventhandlers","level":4,"markdown":"- Events: General"},{"heading":"Alphabetical Order","level":3,"markdown":"> [!NOTE]\n> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found **here**.\n\n> [!WARNING]\n> Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with [this](https://github.com/7erra/BIKI.VR/blob/master/fnc/generateCTPage.sqf) config crawler.\n\n```cpp\n#define CT_CONTEXT_MENU 14\n```"},{"heading":"Default Classes","level":3,"markdown":"> [!NOTE]\n> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`\n>\n> ---\n>\n> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the import keyword).\n>\n> In older versions, use `\"Default\" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the description.ext.\n\nThere are no base classes for this control type."},{"heading":"Other Examples","level":3,"markdown":"The following control class is exported from the Arma 3 config.\n\n```cpp\nclass RscDisplayUavTerminalWaypointMenu\n{\n    idc=108;\n    type=CT_CONTEXT_MENU;\n    font=\"RobotoCondensed\";\n    sizeEx=\"0.028*SafezoneH\";\n    style=0;\n    colorBackground[]={0,0,0,0.5};\n    colorBorder[]={0,0,0,0};\n    colorSeparator[]={0.94999999,0.94999999,0.94999999,1};\n    colorSelectBackground[]={1,1,1,0.30000001};\n    colorChecked[]=\n    {\n        \"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])\",\n        \"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])\",\n        \"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])\",\n        \"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])\"\n    };\n    colorEnabled[]={1,1,1,1};\n    colorDisabled[]={1,1,1,0.25};\n    x=0;\n    y=0;\n    w=0;\n    h=0;\n};\n```"}],"categories":["Control Types"],"groups":["GUI"]}