---
name: "CT MENU"
type: topic
source: https://community.bistudio.com/wiki/CT_MENU
revid: 342185
updated: 2023-07-09T12:27:00Z
---

# CT MENU

### Introduction

Eden Editor context menu which is opened with right click. Same problems as [CT_CONTEXT_MENU](../topics/CT_CONTEXT_MENU.md). 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](../commands/menuAdd.md), [menuSize](../commands/menuSize.md), etc) don't seem to work on it.

#### Related commands & functions

- Commands: General
- Commands: UI Eventhandlers
- Commands: Menu

#### Related User Interface Eventhandlers

- [Events: General](../topics/User_Interface_Event_Handlers.md#generic-events)

### Alphabetical Order

> [!NOTE]
> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found [**here**](../topics/Arma~3A_GUI_Configuration.md#common-properties).

> [!WARNING]
> 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.

```cpp
#define CT_MENU 46
```

#### A

##### arrow

**Type:** String

**Description:** Path to .paa file or procedural texture.

```cpp
arrow = "";
```

#### I

##### itemSpacingH

**Type:** Number

**Description:** n/a

```cpp
itemSpacingH = 0;
```

##### itemSpacingW

**Type:** Number

**Description:** n/a

```cpp
itemSpacingW = 0;
```

##### Items

**Type:** Class

**Description:** 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](../topics/Eden_Editor~3A_Entity_Context_Menu.md) 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](../topics/Simple_Expression.md). Refer to [Eden Editor: Entity Context Menu](../topics/Eden_Editor~3A_Entity_Context_Menu.md) |

```cpp
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;
    };
};
```

#### P

##### pictureCheckboxEnabled

**Type:** String

**Description:** Path to .paa file or procedural texture.

```cpp
pictureCheckboxEnabled = "";
```

##### pictureCheckboxDisabled

**Type:** String

**Description:** Path to .paa file or procedural texture.

```cpp
pictureCheckboxDisabled = "";
```

##### pictureRadioEnabled

**Type:** String

**Description:** Path to .paa file or procedural texture.

```cpp
pictureRadioEnabled = "";
```

##### pictureRadioDisabled

**Type:** String

**Description:** Path to .paa file or procedural texture.

```cpp
pictureRadioDisabled = "";
```

#### R

##### rowHeight

**Type:** Number

**Description:** n/a

```cpp
rowHeight = 0.025;
```

### Default Classes

> [!NOTE]
> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`
>
> ---
>
> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the [import](../topics/import_~28Config~29.md) keyword).
>
> In older versions, use `"Default" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the [description.ext](../topics/Description.ext.md).

None

### Other Examples

```cpp
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;
        };
    };
};
```

<sub>Source: [BI Community Wiki — CT MENU](https://community.bistudio.com/wiki/CT_MENU) (revision 342185).</sub>
