---
name: "CT ACTIVETEXT"
type: topic
source: https://community.bistudio.com/wiki/CT_ACTIVETEXT
revid: 351452
updated: 2023-12-06T09:57:40Z
---

# CT ACTIVETEXT

### Introduction

The active text control behaves very similar to buttons. It shows up as regular text with the additional functionality that you can click and select it. The dialog's currently selected Active Text control will be underlined to indicate its status. By default, the first Active Text control is selected. When the mouse cursor hovers over an instance of this control, it will show up in the color defined in the *colorActive* property. It is also possible to show a clickable image instead of text.

> [!NOTE]
> If you need to show text and an image at the same time you can use [CT_SHORTCUTBUTTON](../topics/CT_SHORTCUTBUTTON.md).

**Notice:** This control doesn't render the usually common *colorBackground* property and *colorText* is replaced with *color*.

- For Arrowhead, this is not true. The properties are there, and it might be an attempt to standardise, or to account for pictures

#### Related commands & functions

- Commands: General
- Commands: UI Eventhandlers
- Commands: Button (TODO)

#### Related User Interface Eventhandlers

- [Events: General](../topics/User_Interface_Event_Handlers.md#generic-events)
- [Commands: Button](../topics/User_Interface_Event_Handlers.md#button-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_ACTIVETEXT 11
```

#### A

##### action

**Type:** String

**Description:** **SQS** code to execute when the control is clicked.

> [!IMPORTANT]
> Use [onButtonClick](../topics/User_Interface_Event_Handlers.md#onbuttonclick) instead.

```cpp
action = "[finddisplay 26] call (uinamespace getvariable 'BIS_fnc_help');";
```

##### angle

**Type:** Number

**Description:** n/a

```cpp
angle = 180;
```

#### B

##### blinkingPeriod

**Type:** Number

**Description:** Makes the text start transparent, go to full opacity and back to full transparent in the amount of time specified.

```cpp
blinkingPeriod = 1.2;
```

#### C

##### canDrag

**Type:** Number

**Description:** n/a

```cpp
canDrag = 1;
```

##### color

**Type:** Array

**Description:** **Replaces *colorText***, standard text and underline color.

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

##### colorActive

**Type:** Array

**Description:** Text and underline color whenever the mouse hovers over the control.

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

##### colorBackgroundSelected

**Type:** Array

**Description:** n/a

```cpp
colorBackgroundSelected[] = {1,1,1,0.1};
```

##### colorFocused

**Type:** Array

**Description:** n/a

```cpp
colorFocused[] = {0,0,0,0};
```

##### colorShade

**Type:** Array

**Description:** n/a

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

#### D

##### default

**Type:** Number

**Description:** Whether or not this control is the dialog's initially selected active text.

```cpp
default = 1;
```

##### DLCTemplate

**Type:** Class

**Description:** n/a

```cpp
class DLCTemplate
{
    class controls
    {
        class DlcBg
        {
            idc = 101;
            text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayInventory\InventoryStripe_ca.paa";
            color[] = {1,1,1,1};
            x = 0;
            y = 0;
            w = 1.8 * GUI_GRID_W;
            h = 1.8 * GUI_GRID_H;
        };
        class DlcIcon
        {
            idc = 100;
            text = "";
            color[] = {1,1,1,1};
            x = 0 * GUI_GRID_W;
            y = 0 * GUI_GRID_H;
            w = 1 * GUI_GRID_W;
            h = 1 * GUI_GRID_H;
        };
    };
};
```

#### E

##### enabled

**Type:** Number

**Description:** n/a

```cpp
enabled = 0;
```

#### P

##### picture

**Type:** String

**Description:** n/a

```cpp
picture = "a3\ui_f\data\gui\rsc\rscdisplaymultiplayersetup\flag_opfor_empty_ca.paa";
```

##### pictureHeight

**Type:** Number

**Description:** n/a

```cpp
pictureHeight = 1;
```

##### pictureWidth

**Type:** Number

**Description:** n/a

```cpp
pictureWidth = 1;
```

#### S

##### shortcuts

**Type:** Array

**Description:** n/a

```cpp
shortcuts[] = {"512 + 0x11"};
```

##### sideDisabled

**Type:** String

**Description:** n/a

```cpp
sideDisabled = "a3\ui_f\data\gui\rsc\rscdisplaymultiplayersetup\flag_none_ca.paa";
```

##### sideToggle

**Type:** String

**Description:** n/a

```cpp
sideToggle = "a3\ui_f\data\gui\rsc\rscdisplaymultiplayersetup\flag_opfor_ca.paa";
```

##### soundClick

**Type:** Array

**Description:** The sound to play, when the button is being released.

```cpp
soundClick[] = {"",0.1,1};
```

##### soundDoubleClick

**Type:** Array

**Description:** The sound to play, when the cursor enters the button's bounds.

```cpp
soundDoubleClick[] = {"",0.1,1};
```

##### soundEnter

**Type:** Array

**Description:** The sound to play, when the cursor enters the button's bounds.

```cpp
soundEnter[] = {"",0.1,1};
```

##### soundEscape

**Type:** Array

**Description:** The sound to play, when the button has been pushed and the mouse button is released when not over the control.

```cpp
soundEscape[] = {"",0.1,1};
```

##### soundPush

**Type:** Array

**Description:** The sound to play, when the button has been pushed.

```cpp
soundPush[] = {"",0.1,1};
```

#### T

##### textHeight

**Type:** Number

**Description:** n/a

```cpp
textHeight = 0.38;
```

##### textMuted

**Type:** String

**Description:** n/a

```cpp
textMuted = "\A3\Ui_f\Data\IGUI\RscIngameUI\RscDisplayChannel\MuteVON_crossed_ca.paa";
```

#### U

##### url

**Type:** String

**Description:** Link to open when control is pressed.

```cpp
url = "";
```

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

#### RscActiveText

```cpp
class RscActiveText
{
    deletable = 0;
    fade = 0;
    access = 0;
    type = CT_ACTIVETEXT;
    style = ST_CENTER;
    color[] = {0,0,0,1};
    colorActive[] = {0.3,0.4,0,1};
    colorDisabled[] = {1,1,1,0.25};
    soundEnter[] =
    {
        "",
        0.1,
        1
    };
    soundPush[] =
    {
        "",
        0.1,
        1
    };
    soundClick[] =
    {
        "",
        0.1,
        1
    };
    soundEscape[] =
    {
        "",
        0.1,
        1
    };
    text = "";
    default = 0;
    idc = -1;
    x = 0;
    y = 0;
    h = 0.035;
    w = 0.035;
    font = "RobotoCondensed";
    shadow = 2;
    sizeEx = GUI_TEXT_SIZE_MEDIUM;
    url = "";
    tooltipColorText[] = {1,1,1,1};
    tooltipColorBox[] = {1,1,1,1};
    tooltipColorShade[] = {0,0,0,0.65};
};
```

#### RscActivePicture

```cpp
class RscActivePicture : RscActiveText
{
    style = ST_MULTI + ST_TITLE_BAR;
    color[] = {1,1,1,0.5};
    colorActive[] = {1,1,1,1};
};
```

#### RscActivePictureKeepAspect

```cpp
class RscActivePictureKeepAspect : RscActivePicture
{
    style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO;
};
```

<sub>Source: [BI Community Wiki — CT ACTIVETEXT](https://community.bistudio.com/wiki/CT_ACTIVETEXT) (revision 351452).</sub>
