CT XSLIDER: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Redirected page to DialogControls-Sliders)
 
m (CT_XSLIDER can only be horizontal)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
#REDIRECT [[DialogControls-Sliders]]
[[Category: Control Types]]
 
{{CT|intro
 
|macro = CT_XSLIDER
|value = 43
|description =
* ''Sliders'' and ''Scrollbars'' are synonymous.
* While there are horizontal and vertical versions of [[CT_SLIDER]] (see {{Link|Arma: GUI Configuration#CT_SLIDER Specific Styles}}), [[CT_XSLIDER]] can only be horizontal.
* 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 {{hl|Scrollbar}} classes.
 
{{Feature|important|It makes no sense to create an independent scrollbar without an IDC.}}
 
|gallery=A3 Sliders.jpg{{!}}Left: CT_Slider Right: CT_XSLIDER
 
|commands =
* [[sliderPosition]]
* [[sliderRange]]
* [[sliderSetPosition]]
* [[sliderSetRange]]
* [[sliderSetSpeed]]
* [[sliderSpeed]]
 
|events =
* [[User_Interface_Event_Handlers#onSliderPosChanged|onSliderPosChanged]]
}}
 
{{CT|abc start}}
=== A ===
{{CT|attribute
|name=arrowEmpty
|type1=String
|value1="\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"
|description=
}}
 
{{CT|attribute
|name=arrowFull
|type1=String
|value1="\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"
|description=
}}
 
=== B ===
{{CT|attribute
|name=border
|type1=String
|value1="\A3\ui_f\data\gui\cfg\slider\border_ca.paa"
|description=
}}
 
=== C ===
{{CT|attribute
|name=color
|type1=Array
|value1={1,1,1,0.6}
|description=
}}
 
{{CT|attribute
|name=colorActive
|type1=Array
|value1={1,1,1,0.6}
|description=
}}
 
{{CT|attribute
|name=colorDisable
|type1=Array
|value1={1,1,1,0.4}
|description=
}}
 
=== L ===
{{CT|attribute
|name=lineSize
|type1=Number
|value1=0.1
|description=
}}
 
=== S ===
{{CT|attribute
|name=sliderPosition
|type1=Number
|value1=42
|description=
}}
 
{{CT|attribute
|name=sliderRange
|type1=Array
|value1={0, 1}
|description= Defines the from-to range of the slider.
}}
 
{{CT|attribute
|name=sliderStep
|type1=Number
|value1=1
|description= Defines the increment size in which the value is changed when the slider is dragged.
}}
 
=== T ===
{{CT|attribute
|name=thumb
|type1=String
|value1="\a3\3DEN\Data\Controls\CtrlXSlider\thumb_ca.paa"
|description=
}}
 
{{CT|abc end}}
 
{{CT|examples}}
=== RscXSliderH ===
<syntaxhighlight lang="cpp">
class RscXSliderH
{
deletable = 0;
fade = 0;
type = CT_XSLIDER ;
color[] = {1,1,1,0.6};
colorActive[] = {1,1,1,1};
colorDisable[] = {1,1,1,0.4};
style = SL_HORZ + SL_TEXTURES;
shadow = 0;
x = 0;
y = 0;
h = 0.03;
w = 0.4;
colorDisabled[] = {1,1,1,0.2};
arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa";
border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa";
thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa";
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
};
</syntaxhighlight>

Latest revision as of 10:52, 27 July 2024


Introduction

It makes no sense to create an independent scrollbar without an IDC.

Related commands & functions

Related User Interface Eventhandlers

Alphabetical Order

TokenNames common to most controls, such as x, y, w, h, text, idc... can be found here.
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_XSLIDER 43


A

arrowEmpty

Type
String
Description
n/a
arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa";


arrowFull

Type
String
Description
n/a
arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa";


B

border

Type
String
Description
n/a
border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa";


C

color

Type
Array
Description
n/a
color[] = {1,1,1,0.6};


colorActive

Type
Array
Description
n/a
colorActive[] = {1,1,1,0.6};


colorDisable

Type
Array
Description
n/a
colorDisable[] = {1,1,1,0.4};


L

lineSize

Type
Number
Description
n/a
lineSize = 0.1;


S

sliderPosition

Type
Number
Description
n/a
sliderPosition = 42;


sliderRange

Type
Array
Description
Defines the from-to range of the slider.
sliderRange[] = {0, 1};


sliderStep

Type
Number
Description
Defines the increment size in which the value is changed when the slider is dragged.
sliderStep = 1;


T

thumb

Type
String
Description
n/a
thumb = "\a3\3DEN\Data\Controls\CtrlXSlider\thumb_ca.paa";



Default Classes

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.

RscXSliderH

class RscXSliderH
{
	deletable = 0;
	fade = 0;
	type = CT_XSLIDER ;
	color[] = {1,1,1,0.6};
	colorActive[] = {1,1,1,1};
	colorDisable[] = {1,1,1,0.4};
	style = SL_HORZ + SL_TEXTURES;
	shadow = 0;
	x = 0;
	y = 0;
	h = 0.03;
	w = 0.4;
	colorDisabled[] = {1,1,1,0.2};
	arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa";
	arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa";
	border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa";
	thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa";
	tooltipColorText[] = {1,1,1,1};
	tooltipColorBox[] = {1,1,1,1};
	tooltipColorShade[] = {0,0,0,0.65};
};