Arma 3 Scripting

CT TOOLBOX

  • Also known as DialogControls-Toolbox

Topic · Markdown · JSON · original wiki page

Introduction

A Toolbox is a set of options, ordered by columns and rows. Only one can be active at a time and one is always selected (the first one by default). For Toolbox with multiple selections see CT_CHECKBOXES.

Alphabetical Order

Note

TokenNames common to most controls, such as x, y, w, h, text, idc... can be found here.

Warning

Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with this config crawler.

#define CT_TOOLBOX 6

C

checked_strings

Type: Array

Description: Options texts to display when an option is selected.

checked_strings[] = {"[Entry 1]","[Entry 2]","[Entry 3]","[Entry 4]","[Entry 5]","[Entry 6]"};

color

Type: Array

Description: n/a

color[] = {0.95,0.95,0.95,1};

colorBackground

Type: Array

Description: Color of the background when option is not selected.

colorBackground[] = {0.95,0.95,0.95,1};

colorDisable

Type: Array

Description: n/a

colorDisable[] = {0,0,0,0};

colorSelect

Type: Array

Description: n/a

colorSelect[] = {0.95,0.95,0.95,1};

colorSelectedBg

Type: Array

Description: Color of the background when option is selected.

colorSelectedBg[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",0.5};

colorTextDisable

Type: Array

Description: n/a

colorTextDisable[] = {0.4,0.4,0.4,1};

colorTextSelect

Type: Array

Description: Color of the selected option text.

colorTextSelect[] = {1,1,1,1};

columns

Type: Number, String

Description: Amount of columns to arrange options into.

Number example:

columns = 3;

String example:

columns = "4 - 1";

N

names

Type: Array

Description: n/a

names[] = {"MOVE","GETOUT","UNLOAD","TR UNLOAD","%1/cfgWaypoints/A3/Land","%1/cfgWaypoints/A3/Artillery","UNHOOK"};

R

rows

Type: Number

Description: Amount of rows to arrange options into.

rows = 2;

S

strings

Type: Array

Description: Options texts to display.

strings[] = {"100m","200m","500m"};

T

tooltips

Type: Array

Description: Tooltips for each option.

tooltips[] = {"Objects","Compositions","Triggers","Systems","Markers"};

V

values

Type: Array

Description: Numerical values associated with items. Can be retrieved or set with lbValue and lbSetValue.

values[] = {0,1,2,3,4,5,6};

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

In older versions, use "Default" call BIS_fnc_exportGUIBaseClasses; and paste the result into the description.ext.

RscExample

class RscToolbox
{
    deletable = 0;
    fade = 0;
    access = 0;
    type = CT_TOOLBOX;
    style = ST_CENTER;
    colorText[] = {0.95,0.95,0.95,1};
    color[] = {0.95,0.95,0.95,1};
    colorTextSelect[] = {0.95,0.95,0.95,1};
    colorSelect[] = {0.95,0.95,0.95,1};
    colorTextDisable[] = {0.4,0.4,0.4,1};
    colorDisable[] = {0.4,0.4,0.4,1};
    colorSelectedBg[] =
    {
        "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
        "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
        "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
        0.5
    };
    shadow = 0;
    strings[] =
    {
        "",
        ""
    };
    x = 0;
    y = 0;
    w = 0.3;
    h = 0.025;
    rows = 1;
    columns = 2;
    font = "RobotoCondensed";
    sizeEx = GUI_TEXT_SIZE_SMALL;
};