{"name":"CT XSLIDER","title":"CT XSLIDER","type":"topic","url":"https://community.bistudio.com/wiki/CT_XSLIDER","revid":365145,"updated":"2024-07-27T09:52:47Z","aliases":[],"markdown":"### Introduction\n\n- *Sliders* and *Scrollbars* are synonymous.\n- While there are horizontal and vertical versions of CT_SLIDER (see Arma: GUI Configuration - CT_SLIDER Specific Styles), CT_XSLIDER can only be horizontal.\n- Embedded child scrollbars are created by the engine as and when required for various control types (e.g. CT_CONTROLS_GROUP or CT_LISTBOX). The engine generates its own IDC for them. In most cases it is possible to configure (auto-generated) scrollbars via `Scrollbar` classes.\n\n> [!IMPORTANT]\n> It makes no sense to create an independent scrollbar without an IDC.\n\n#### Related commands & functions\n\n- Commands: General\n- Commands: UI Eventhandlers\n- sliderPosition\n- sliderRange\n- sliderSetPosition\n- sliderSetRange\n- sliderSetSpeed\n- sliderSpeed\n\n#### Related User Interface Eventhandlers\n\n- Events: General\n- onSliderPosChanged\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_XSLIDER 43\n```\n\n#### A\n\n##### arrowEmpty\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\narrowEmpty = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\arrowEmpty_ca.paa\";\n```\n\n##### arrowFull\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\narrowFull = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\arrowFull_ca.paa\";\n```\n\n#### B\n\n##### border\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nborder = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\border_ca.paa\";\n```\n\n#### C\n\n##### color\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolor[] = {1,1,1,0.6};\n```\n\n##### colorActive\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorActive[] = {1,1,1,0.6};\n```\n\n##### colorDisable\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorDisable[] = {1,1,1,0.4};\n```\n\n#### L\n\n##### lineSize\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nlineSize = 0.1;\n```\n\n#### S\n\n##### sliderPosition\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nsliderPosition = 42;\n```\n\n##### sliderRange\n\n**Type:** Array\n\n**Description:** Defines the from-to range of the slider.\n\n```cpp\nsliderRange[] = {0, 1};\n```\n\n##### sliderStep\n\n**Type:** Number\n\n**Description:** Defines the increment size in which the value is changed when the slider is dragged.\n\n```cpp\nsliderStep = 1;\n```\n\n#### T\n\n##### thumb\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nthumb = \"\\a3\\3DEN\\Data\\Controls\\CtrlXSlider\\thumb_ca.paa\";\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#### RscXSliderH\n\n```cpp\nclass RscXSliderH\n{\n    deletable = 0;\n    fade = 0;\n    type = CT_XSLIDER ;\n    color[] = {1,1,1,0.6};\n    colorActive[] = {1,1,1,1};\n    colorDisable[] = {1,1,1,0.4};\n    style = SL_HORZ + SL_TEXTURES;\n    shadow = 0;\n    x = 0;\n    y = 0;\n    h = 0.03;\n    w = 0.4;\n    colorDisabled[] = {1,1,1,0.2};\n    arrowEmpty = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\arrowEmpty_ca.paa\";\n    arrowFull = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\arrowFull_ca.paa\";\n    border = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\border_ca.paa\";\n    thumb = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\thumb_ca.paa\";\n    tooltipColorText[] = {1,1,1,1};\n    tooltipColorBox[] = {1,1,1,1};\n    tooltipColorShade[] = {0,0,0,0.65};\n};\n```","sections":[{"heading":"Introduction","level":3,"markdown":"- *Sliders* and *Scrollbars* are synonymous.\n- While there are horizontal and vertical versions of CT_SLIDER (see Arma: GUI Configuration - CT_SLIDER Specific Styles), CT_XSLIDER can only be horizontal.\n- Embedded child scrollbars are created by the engine as and when required for various control types (e.g. CT_CONTROLS_GROUP or CT_LISTBOX). The engine generates its own IDC for them. In most cases it is possible to configure (auto-generated) scrollbars via `Scrollbar` classes.\n\n> [!IMPORTANT]\n> It makes no sense to create an independent scrollbar without an IDC."},{"heading":"Related commands & functions","level":4,"markdown":"- Commands: General\n- Commands: UI Eventhandlers\n- sliderPosition\n- sliderRange\n- sliderSetPosition\n- sliderSetRange\n- sliderSetSpeed\n- sliderSpeed"},{"heading":"Related User Interface Eventhandlers","level":4,"markdown":"- Events: General\n- onSliderPosChanged"},{"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_XSLIDER 43\n```"},{"heading":"A","level":4,"markdown":""},{"heading":"arrowEmpty","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\narrowEmpty = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\arrowEmpty_ca.paa\";\n```"},{"heading":"arrowFull","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\narrowFull = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\arrowFull_ca.paa\";\n```"},{"heading":"B","level":4,"markdown":""},{"heading":"border","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nborder = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\border_ca.paa\";\n```"},{"heading":"C","level":4,"markdown":""},{"heading":"color","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolor[] = {1,1,1,0.6};\n```"},{"heading":"colorActive","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorActive[] = {1,1,1,0.6};\n```"},{"heading":"colorDisable","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorDisable[] = {1,1,1,0.4};\n```"},{"heading":"L","level":4,"markdown":""},{"heading":"lineSize","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nlineSize = 0.1;\n```"},{"heading":"S","level":4,"markdown":""},{"heading":"sliderPosition","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nsliderPosition = 42;\n```"},{"heading":"sliderRange","level":5,"markdown":"**Type:** Array\n\n**Description:** Defines the from-to range of the slider.\n\n```cpp\nsliderRange[] = {0, 1};\n```"},{"heading":"sliderStep","level":5,"markdown":"**Type:** Number\n\n**Description:** Defines the increment size in which the value is changed when the slider is dragged.\n\n```cpp\nsliderStep = 1;\n```"},{"heading":"T","level":4,"markdown":""},{"heading":"thumb","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nthumb = \"\\a3\\3DEN\\Data\\Controls\\CtrlXSlider\\thumb_ca.paa\";\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":"RscXSliderH","level":4,"markdown":"```cpp\nclass RscXSliderH\n{\n    deletable = 0;\n    fade = 0;\n    type = CT_XSLIDER ;\n    color[] = {1,1,1,0.6};\n    colorActive[] = {1,1,1,1};\n    colorDisable[] = {1,1,1,0.4};\n    style = SL_HORZ + SL_TEXTURES;\n    shadow = 0;\n    x = 0;\n    y = 0;\n    h = 0.03;\n    w = 0.4;\n    colorDisabled[] = {1,1,1,0.2};\n    arrowEmpty = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\arrowEmpty_ca.paa\";\n    arrowFull = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\arrowFull_ca.paa\";\n    border = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\border_ca.paa\";\n    thumb = \"\\A3\\ui_f\\data\\gui\\cfg\\slider\\thumb_ca.paa\";\n    tooltipColorText[] = {1,1,1,1};\n    tooltipColorBox[] = {1,1,1,1};\n    tooltipColorShade[] = {0,0,0,0.65};\n};\n```"}],"categories":["Control Types"],"groups":["GUI"]}