{"name":"CT STATIC","title":"CT STATIC","type":"topic","url":"https://community.bistudio.com/wiki/CT_STATIC","revid":376897,"updated":"2025-12-20T15:48:42Z","aliases":[],"markdown":"### Introduction\n\nStatic controls represent exactly that: static data. Static means there is NO possible user interaction. CT_STATIC is primarily used for texts, dialog backgrounds, pictures (and videos). The constant *type* property for these controls usually is `CT_STATIC`.\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_STATIC 0\n```\n\n#### A\n\n##### align\n\n**Type:** String\n\n**Description:** Alignment of text. Values can be \"left\", \"center\" or \"right\". Seems to have no effect. Use ST_LEFT/ST_CENTER/ST_RIGHT instead.\n\n```cpp\nalign = \"center\";\n```\n\n##### angle\n\n**Type:** Number\n\n**Description:** Rotation of the image. See ctrlSetAngle.\n\n```cpp\nangle = 180;\n```\n\n##### autoplay\n\n**Type:** Number\n\n**Description:** Used on video controls. 1 means that the video starts playing as soon as the UI is opened.\n\n```cpp\nautoplay = 0;\n```\n\n#### B\n\n##### background\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nbackground = 1;\n```\n\n#### C\n\n##### centerU\n\n**Type:** Number\n\n**Description:** Sets the horizontal center for the rotation of images with ST_PICTURE controls. 0 is left border of the control, 1 is right border. See also: ctrlSetAngle.\n\n```cpp\ncenterU = 0.5;\n```\n\n##### centerV\n\n**Type:** Number\n\n**Description:** Sets the vertical center for the rotation of images with ST_PICTURE controls. 0 is top border of the control, 1 is bottom border. See also: ctrlSetAngle.\n\n```cpp\ncenterV = 0.5;\n```\n\n##### color\n\n**Type:** Array\n\n**Description:** Most likely without function.\n\n```cpp\ncolor[] = { 1, 1, 1, 1 };\n```\n\n##### colorActive\n\n**Type:** Array\n\n**Description:** Not applicable for this type as it can not be active.\n\n```cpp\ncolorActive[] = { 0.23, 0.35, 0.42, 0.9 };\n```\n\n##### colorShadow\n\n**Type:** Array\n\n**Description:** Color of the shadow of the text.\n\n```cpp\ncolorShadow[] = { 0, 0, 0, 1 };\n```\n\n#### F\n\n##### fixedWidth\n\n**Type:** Number\n\n**Description:** Makes normal text like \"LALALA\" appear like \"L A L A L A\".\n\n```cpp\nfixedWidth = 0;\n```\n\n#### L\n\n##### lines\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nlines = 3;\n```\n\n##### lineSpacing\n\n**Type:** Number\n\n**Description:** Space between lines, required if the style was set to ST_MULTI.\n\n```cpp\nlineSpacing = 0;\n```\n\n##### loops\n\n**Type:** Number\n\n**Description:** Defines how many times video will be restarted.\n\n```cpp\nloops = 0;\n```\n\n#### S\n\n##### sortDown\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nsortDown = \"\\a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\arrow_down_ca.paa\";\n```\n\n##### sortUp\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nsortUp = \"\\a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\arrow_up_ca.paa\";\n```\n\n#### T\n\n##### tileH\n\n**Type:** Number, String\n\n**Description:** Height of one tile. Used with ST_TILE_PICTURE to create a repeating wall of pictures, such as the fullscreen backgrounds in the Eden Editor. Uses GUI Coordinates.\n\nNumber example:\n\n```cpp\ntileH = 1;\n```\n\nString example:\n\n```cpp\ntileH = \"4 / (32 * pixelH)\";\n```\n\n##### tileW\n\n**Type:** Number, String\n\n**Description:** Width of one tile. Used with ST_TILE_PICTURE to create a repeating wall of pictures, such as the fullscreen backgrounds in the Eden Editor. Uses GUI Coordinates.\n\nNumber example:\n\n```cpp\ntileW = 1;\n```\n\nString example:\n\n```cpp\ntileW = \"8 / (32 * pixelW)\";\n```\n\n#### W\n\n##### widgetLineWidth\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nwidgetLineWidth = 10;\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\n#### RscText\n\nMost often this type of control will be used to add text to dialogs. If you want the text to change dynamically while playing the mission, you should set the *idc* property to a positive number, which allows usage of the ctrlSetText function. Text alignment can be controlled using the *style* property and the `ST_*` constants.\n\nBy default, this will only display a **single line** (and cut the overflow); use `ST_MULTI` if you intend to use multiple lines. This also requires setting the property *lineSpacing*, which indicates the relative space between lines; usually, you can set this to 1 for normal line spacing.\n\n```cpp\nclass RscText\n{\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = CT_STATIC;\n    idc = -1;\n    colorBackground[] = { 0, 0, 0, 0 };\n    colorText[] = { 1, 1, 1, 1 };\n    text = \"\";\n    fixedWidth = 0;\n    x = 0;\n    y = 0;\n    h = 0.037;\n    w = 0.3;\n    style = ST_LEFT;\n    shadow = 1;\n    colorShadow[] = { 0, 0, 0, 0.5 };\n    font = \"RobotoCondensed\";\n    SizeEx = GUI_TEXT_SIZE_MEDIUM;\n    linespacing = 1;\n    tooltipColorText[] = { 1, 1, 1, 1 };\n    tooltipColorBox[] = { 1, 1, 1, 1 };\n    tooltipColorShade[] = { 0, 0, 0, 0.65 };\n};\n```\n\n##### Trivia\n\nWhen an RscText control with IDC 101 is added to the map, it displays the current time.\n\n```sqf\nprivate _ctrl = findDisplay 12 ctrlCreate [\"RscText\", 101];\n_ctrl ctrlSetPosition [0, 0, 1, 1];\n_ctrl ctrlCommit 0;\n_ctrl ctrlSetFontHeight 0.5;\n```\n\n#### RscLine\n\nDraws a single line from top left to bottom right corner of the control.\n\n```cpp\nclass RscLine : RscText\n{\n    idc = -1;\n    style = ST_MULTI + ST_TITLE_BAR + ST_HUD_BACKGROUND;\n    x = 0.17;\n    y = 0.48;\n    w = 0.66;\n    h = 0;\n    text = \"\";\n    colorBackground[] = { 0, 0, 0, 0 };\n    colorText[] = { 1, 1, 1, 1 };\n};\n```\n\n#### RscFrame\n\nFrame that outlines the control's borders. When text is set it appears on the top line to the left.\n\n```cpp\nclass RscFrame\n{\n    type = CT_STATIC;\n    idc = -1;\n    deletable = 0;\n    style = ST_FRAME;\n    shadow = 2;\n    colorBackground[] = { 0, 0, 0, 0 };\n    colorText[] = { 1, 1, 1, 1 };\n    font = \"RobotoCondensed\";\n    sizeEx = 0.02;\n    text = \"\";\n    x = 0;\n    y = 0;\n    w = 0.3;\n    h = 0.3;\n};\n```\n\n#### RscPicture\n\nUsing specific style constants you can enhance your dialogs with pictures too.\nThese pictures should reside in your mission folder as paa-files.\nThen set your *style* property to `ST_PICTURE` (to display it once) or `ST_TILE_PICTURE` (to tile it) and use the *text* property to locate the paa image you want to use, relative to your addon or mission folder (*absolute paths should not be used*).\n\n```cpp\nclass RscPicture\n{\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = CT_STATIC;\n    idc = -1;\n    style = ST_MULTI + ST_TITLE_BAR;\n    colorBackground[] = { 0, 0, 0, 0 };\n    colorText[] = { 1, 1, 1, 1 };\n    font = \"TahomaB\";\n    sizeEx = 0;\n    lineSpacing = 0;\n    text = \"\";\n    fixedWidth = 0;\n    shadow = 0;\n    x = 0;\n    y = 0;\n    w = 0.2;\n    h = 0.15;\n    tooltipColorText[] = { 1, 1, 1, 1 };\n    tooltipColorBox[] = { 1, 1, 1, 1 };\n    tooltipColorShade[] = { 0, 0, 0, 0.65 };\n};\n```\n\n#### RscPictureKeepAspect\n\nSame as RscPicture, but keeps the image the same ratio as in the source file.\n\n```cpp\nclass RscPictureKeepAspect : RscPicture\n{\n    style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO;\n};\n```\n\n#### RscVideo (Arma 2: Operation Arrowhead v1.56)\n\nAll settings are same as for pictures, only source file must be of *.OGV* format.\nTwo additional properties are available - *autoplay* (when 1, video starts automatically) and *loops* (defines how many times video will be played in loop).\n\nFor video encoding, you can use:\n\n- [ffmpeg2theora](http://www.v2v.cc/~j/ffmpeg2theora/download.html)\n- [Theora Converter .NET (GUI for ffmpeg2theora)](http://sourceforge.net/projects/theoraconverter/)\n\n```cpp\nclass RscVideo : RscPicture\n{\n    autoplay = 1;\n    loops = 1;\n};\n```\n\n#### RscVideoKeepAspect (Arma 3)\n\nSame as RscVideo but keeps the source video's aspect ratio.\n\n```cpp\nclass RscVideoKeepAspect : RscVideo\n{\n    autoplay = 1;\n    loops = 1;\n    style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO;\n};\n```\n\n### Other Classes\n\n#### Static background\n\nOne can also use this control type to add solid background to dialogs by simply leaving the *text* property empty. This way, it will look like a regular rectangle.\n\n```cpp\nclass MyRedBackgroundExample\n{\n    /* ... same as the text example, except for */\n    colorBackground[] = { 1, 0.1, 0.1, 0.8 };\n    text = \"\";\n};\n```","sections":[{"heading":"Introduction","level":3,"markdown":"Static controls represent exactly that: static data. Static means there is NO possible user interaction. CT_STATIC is primarily used for texts, dialog backgrounds, pictures (and videos). The constant *type* property for these controls usually is `CT_STATIC`."},{"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_STATIC 0\n```"},{"heading":"A","level":4,"markdown":""},{"heading":"align","level":5,"markdown":"**Type:** String\n\n**Description:** Alignment of text. Values can be \"left\", \"center\" or \"right\". Seems to have no effect. Use ST_LEFT/ST_CENTER/ST_RIGHT instead.\n\n```cpp\nalign = \"center\";\n```"},{"heading":"angle","level":5,"markdown":"**Type:** Number\n\n**Description:** Rotation of the image. See ctrlSetAngle.\n\n```cpp\nangle = 180;\n```"},{"heading":"autoplay","level":5,"markdown":"**Type:** Number\n\n**Description:** Used on video controls. 1 means that the video starts playing as soon as the UI is opened.\n\n```cpp\nautoplay = 0;\n```"},{"heading":"B","level":4,"markdown":""},{"heading":"background","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nbackground = 1;\n```"},{"heading":"C","level":4,"markdown":""},{"heading":"centerU","level":5,"markdown":"**Type:** Number\n\n**Description:** Sets the horizontal center for the rotation of images with ST_PICTURE controls. 0 is left border of the control, 1 is right border. See also: ctrlSetAngle.\n\n```cpp\ncenterU = 0.5;\n```"},{"heading":"centerV","level":5,"markdown":"**Type:** Number\n\n**Description:** Sets the vertical center for the rotation of images with ST_PICTURE controls. 0 is top border of the control, 1 is bottom border. See also: ctrlSetAngle.\n\n```cpp\ncenterV = 0.5;\n```"},{"heading":"color","level":5,"markdown":"**Type:** Array\n\n**Description:** Most likely without function.\n\n```cpp\ncolor[] = { 1, 1, 1, 1 };\n```"},{"heading":"colorActive","level":5,"markdown":"**Type:** Array\n\n**Description:** Not applicable for this type as it can not be active.\n\n```cpp\ncolorActive[] = { 0.23, 0.35, 0.42, 0.9 };\n```"},{"heading":"colorShadow","level":5,"markdown":"**Type:** Array\n\n**Description:** Color of the shadow of the text.\n\n```cpp\ncolorShadow[] = { 0, 0, 0, 1 };\n```"},{"heading":"F","level":4,"markdown":""},{"heading":"fixedWidth","level":5,"markdown":"**Type:** Number\n\n**Description:** Makes normal text like \"LALALA\" appear like \"L A L A L A\".\n\n```cpp\nfixedWidth = 0;\n```"},{"heading":"L","level":4,"markdown":""},{"heading":"lines","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nlines = 3;\n```"},{"heading":"lineSpacing","level":5,"markdown":"**Type:** Number\n\n**Description:** Space between lines, required if the style was set to ST_MULTI.\n\n```cpp\nlineSpacing = 0;\n```"},{"heading":"loops","level":5,"markdown":"**Type:** Number\n\n**Description:** Defines how many times video will be restarted.\n\n```cpp\nloops = 0;\n```"},{"heading":"S","level":4,"markdown":""},{"heading":"sortDown","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nsortDown = \"\\a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\arrow_down_ca.paa\";\n```"},{"heading":"sortUp","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nsortUp = \"\\a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\arrow_up_ca.paa\";\n```"},{"heading":"T","level":4,"markdown":""},{"heading":"tileH","level":5,"markdown":"**Type:** Number, String\n\n**Description:** Height of one tile. Used with ST_TILE_PICTURE to create a repeating wall of pictures, such as the fullscreen backgrounds in the Eden Editor. Uses GUI Coordinates.\n\nNumber example:\n\n```cpp\ntileH = 1;\n```\n\nString example:\n\n```cpp\ntileH = \"4 / (32 * pixelH)\";\n```"},{"heading":"tileW","level":5,"markdown":"**Type:** Number, String\n\n**Description:** Width of one tile. Used with ST_TILE_PICTURE to create a repeating wall of pictures, such as the fullscreen backgrounds in the Eden Editor. Uses GUI Coordinates.\n\nNumber example:\n\n```cpp\ntileW = 1;\n```\n\nString example:\n\n```cpp\ntileW = \"8 / (32 * pixelW)\";\n```"},{"heading":"W","level":4,"markdown":""},{"heading":"widgetLineWidth","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nwidgetLineWidth = 10;\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."},{"heading":"RscText","level":4,"markdown":"Most often this type of control will be used to add text to dialogs. If you want the text to change dynamically while playing the mission, you should set the *idc* property to a positive number, which allows usage of the ctrlSetText function. Text alignment can be controlled using the *style* property and the `ST_*` constants.\n\nBy default, this will only display a **single line** (and cut the overflow); use `ST_MULTI` if you intend to use multiple lines. This also requires setting the property *lineSpacing*, which indicates the relative space between lines; usually, you can set this to 1 for normal line spacing.\n\n```cpp\nclass RscText\n{\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = CT_STATIC;\n    idc = -1;\n    colorBackground[] = { 0, 0, 0, 0 };\n    colorText[] = { 1, 1, 1, 1 };\n    text = \"\";\n    fixedWidth = 0;\n    x = 0;\n    y = 0;\n    h = 0.037;\n    w = 0.3;\n    style = ST_LEFT;\n    shadow = 1;\n    colorShadow[] = { 0, 0, 0, 0.5 };\n    font = \"RobotoCondensed\";\n    SizeEx = GUI_TEXT_SIZE_MEDIUM;\n    linespacing = 1;\n    tooltipColorText[] = { 1, 1, 1, 1 };\n    tooltipColorBox[] = { 1, 1, 1, 1 };\n    tooltipColorShade[] = { 0, 0, 0, 0.65 };\n};\n```"},{"heading":"Trivia","level":5,"markdown":"When an RscText control with IDC 101 is added to the map, it displays the current time.\n\n```sqf\nprivate _ctrl = findDisplay 12 ctrlCreate [\"RscText\", 101];\n_ctrl ctrlSetPosition [0, 0, 1, 1];\n_ctrl ctrlCommit 0;\n_ctrl ctrlSetFontHeight 0.5;\n```"},{"heading":"RscLine","level":4,"markdown":"Draws a single line from top left to bottom right corner of the control.\n\n```cpp\nclass RscLine : RscText\n{\n    idc = -1;\n    style = ST_MULTI + ST_TITLE_BAR + ST_HUD_BACKGROUND;\n    x = 0.17;\n    y = 0.48;\n    w = 0.66;\n    h = 0;\n    text = \"\";\n    colorBackground[] = { 0, 0, 0, 0 };\n    colorText[] = { 1, 1, 1, 1 };\n};\n```"},{"heading":"RscFrame","level":4,"markdown":"Frame that outlines the control's borders. When text is set it appears on the top line to the left.\n\n```cpp\nclass RscFrame\n{\n    type = CT_STATIC;\n    idc = -1;\n    deletable = 0;\n    style = ST_FRAME;\n    shadow = 2;\n    colorBackground[] = { 0, 0, 0, 0 };\n    colorText[] = { 1, 1, 1, 1 };\n    font = \"RobotoCondensed\";\n    sizeEx = 0.02;\n    text = \"\";\n    x = 0;\n    y = 0;\n    w = 0.3;\n    h = 0.3;\n};\n```"},{"heading":"RscPicture","level":4,"markdown":"Using specific style constants you can enhance your dialogs with pictures too.\nThese pictures should reside in your mission folder as paa-files.\nThen set your *style* property to `ST_PICTURE` (to display it once) or `ST_TILE_PICTURE` (to tile it) and use the *text* property to locate the paa image you want to use, relative to your addon or mission folder (*absolute paths should not be used*).\n\n```cpp\nclass RscPicture\n{\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = CT_STATIC;\n    idc = -1;\n    style = ST_MULTI + ST_TITLE_BAR;\n    colorBackground[] = { 0, 0, 0, 0 };\n    colorText[] = { 1, 1, 1, 1 };\n    font = \"TahomaB\";\n    sizeEx = 0;\n    lineSpacing = 0;\n    text = \"\";\n    fixedWidth = 0;\n    shadow = 0;\n    x = 0;\n    y = 0;\n    w = 0.2;\n    h = 0.15;\n    tooltipColorText[] = { 1, 1, 1, 1 };\n    tooltipColorBox[] = { 1, 1, 1, 1 };\n    tooltipColorShade[] = { 0, 0, 0, 0.65 };\n};\n```"},{"heading":"RscPictureKeepAspect","level":4,"markdown":"Same as RscPicture, but keeps the image the same ratio as in the source file.\n\n```cpp\nclass RscPictureKeepAspect : RscPicture\n{\n    style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO;\n};\n```"},{"heading":"RscVideo (Arma 2: Operation Arrowhead v1.56)","level":4,"markdown":"All settings are same as for pictures, only source file must be of *.OGV* format.\nTwo additional properties are available - *autoplay* (when 1, video starts automatically) and *loops* (defines how many times video will be played in loop).\n\nFor video encoding, you can use:\n\n- [ffmpeg2theora](http://www.v2v.cc/~j/ffmpeg2theora/download.html)\n- [Theora Converter .NET (GUI for ffmpeg2theora)](http://sourceforge.net/projects/theoraconverter/)\n\n```cpp\nclass RscVideo : RscPicture\n{\n    autoplay = 1;\n    loops = 1;\n};\n```"},{"heading":"RscVideoKeepAspect (Arma 3)","level":4,"markdown":"Same as RscVideo but keeps the source video's aspect ratio.\n\n```cpp\nclass RscVideoKeepAspect : RscVideo\n{\n    autoplay = 1;\n    loops = 1;\n    style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO;\n};\n```"},{"heading":"Other Classes","level":3,"markdown":""},{"heading":"Static background","level":4,"markdown":"One can also use this control type to add solid background to dialogs by simply leaving the *text* property empty. This way, it will look like a regular rectangle.\n\n```cpp\nclass MyRedBackgroundExample\n{\n    /* ... same as the text example, except for */\n    colorBackground[] = { 1, 0.1, 0.1, 0.8 };\n    text = \"\";\n};\n```"}],"categories":["Control Types"],"groups":["GUI"]}