---
name: "CT XBUTTON"
type: topic
source: https://community.bistudio.com/wiki/CT_XBUTTON
revid: 170192
updated: 2020-11-30T10:08:46Z
---

# CT XBUTTON

### Introduction

Another type of button. Seems like the only difference between other buttons is, that it has no animation when being clicked.

#### Related commands & functions

- Commands: General
- Commands: UI Eventhandlers

#### 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_XBUTTON 41
```

#### C

##### color

**Type:** Array

**Description:** n/a

```cpp
color[] = {1,1,1,1};
```

##### colorActive

**Type:** Array

**Description:** n/a

```cpp
colorActive[] = {1,1,1,1};
```

##### colorActive2

**Type:** Array

**Description:** n/a

```cpp
colorActive2[] = {1,1,1,1};
```

##### colorActiveBackground

**Type:** Array

**Description:** n/a

```cpp
colorActiveBackground[] = {1,0.5,0,1};
```

##### colorActiveBackground2

**Type:** Array

**Description:** n/a

```cpp
colorActiveBackground2[] = {0,0,0,1};
```

#### P

##### period

**Type:** Number

**Description:** n/a

```cpp
period = 1;
```

#### S

##### soundClick

**Type:** Array

**Description:** n/a

```cpp
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
```

##### soundEnter

**Type:** Array

**Description:** n/a

```cpp
soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1};
```

##### soundEscape

**Type:** Array

**Description:** n/a

```cpp
soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
```

##### soundPush

**Type:** Array

**Description:** n/a

```cpp
soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1};
```

### 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 _CT_XBUTTON
{
    access = 0;
    idc = 41;
    type = 41;
    style = 0;
    default = 0;
    enable = 1;
    show = 1;
    fade = 0;
    blinkingPeriod = 0;
    x = 12 * GUI_GRID_W + GUI_GRID_CENTER_X";
    y = 15 * GUI_GRID_H + GUI_GRID_CENTER_Y;
    w = 10 * GUI_GRID_W;
    h = 1 * GUI_GRID_H;
    colorBackground[] = {0,0,0,0};
    colorActiveBackground[] = {1,0.5,0,1};
    colorActiveBackground2[] = {0,0,0,1};
    colorDisabled[] = {0,1,1,1};
    text = "CT_XBUTTON";
    size = GUI_GRID_H;
    font = "RobotoCondensed";
    shadow = 0;
    color[] = {1,1,1,1};
    colorActive[] = {1,1,1,1};
    colorActive2[] = {1,1,1,1};
    tooltip = "CT_XBUTTON";
    tooltipColorShade[] = {0,0,0,1};
    tooltipColorText[] = {1,1,1,1};
    tooltipColorBox[] = {1,1,1,1};
    period = 1;
    soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
    soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1};
    soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1};
    soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
    onCanDestroy = "diag_log ['Log: onCanDestroy',ctrlClassname (_this select 0),_this]; true";
    onDestroy = "diag_log ['Log: onDestroy',ctrlClassname (_this select 0),_this]; false";
    onMouseEnter = "diag_log ['Log: onMouseEnter',ctrlClassname (_this select 0),_this]; false";
    onMouseExit = "diag_log ['Log: onMouseExit',ctrlClassname (_this select 0),_this]; false";
    onSetFocus = "diag_log ['Log: onSetFocus',ctrlClassname (_this select 0),_this]; false";
    onKillFocus = "diag_log ['Log: onKillFocus',ctrlClassname (_this select 0),_this]; false";
    onKeyDown = "diag_log ['Log: onKeyDown',ctrlClassname (_this select 0),_this]; false";
    onKeyUp = "diag_log ['Log: onKeyUp',ctrlClassname (_this select 0),_this]; false";
    onMouseButtonDown = "diag_log ['Log: onMouseButtonDown',ctrlClassname (_this select 0),_this]; false";
    onMouseButtonUp = "diag_log ['Log: onMouseButtonUp',ctrlClassname (_this select 0),_this]; false";
    onMouseButtonClick = "diag_log ['Log: onMouseButtonClick',ctrlClassname (_this select 0),_this]; false";
    onMouseButtonDblClick = "diag_log ['Log: onMouseButtonDblClick',ctrlClassname (_this select 0),_this]; false";
    onMouseZChanged = "diag_log ['Log: onMouseZChanged',ctrlClassname (_this select 0),_this]; false";
    onMouseMoving = "";
    onMouseHolding = "";
    onButtonClick = "diag_log ['Log: onButtonClick',ctrlClassname (_this select 0),_this]; false";
    onButtonDown = "diag_log ['Log: onButtonDown',ctrlClassname (_this select 0),_this]; false";
    onButtonUp = "diag_log ['Log: onButtonUp',ctrlClassname (_this select 0),_this]; false";
};
```

<sub>Source: [BI Community Wiki — CT XBUTTON](https://community.bistudio.com/wiki/CT_XBUTTON) (revision 170192).</sub>
