CT SLIDER: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page overhaul)
Tag: Removed redirect
m (Text replacement - "[[Image:" to "[[File:")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category: Control Types]]
{{CT|intro
{{CT|intro
|macro = CT_SLIDER
|macro = CT_SLIDER
|value = 3
|value = 3
|description = {{Important|This slider is deprecated. You might want to use [[CT_XSLIDER]].}}
|description = {{Feature|important|This slider is deprecated. You might want to use [[CT_XSLIDER]].}}
A slider can be used to make the user select a value in a predefined range.<br>
A slider can be used to make the user select a value in a predefined range.<br>
[[Image:Arma RscSlider.jpg]]
[[File:Arma RscSlider.jpg]]
|commands =
|commands =
* [[sliderPosition]]
* [[sliderPosition]]
Line 105: Line 108:
</syntaxhighlight>
</syntaxhighlight>


[[Category: Dialogs]]
[[Category: Control Types]]

Latest revision as of 23:09, 20 November 2023


Introduction

This slider is deprecated. You might want to use CT_XSLIDER.

A slider can be used to make the user select a value in a predefined range.
Arma RscSlider.jpg


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_SLIDER 3


C

color

Type
Array
Description
Color of the slider.
color[] = {1,1,1,0.8};


colorActive

Type
Array
Description
Color when the slider is focused.
colorActive[] = {1,1,1,1};


S

sliderPosition

Type
Number
Description
Inital value the slider is set to when loaded.
sliderPosition = 42;


sliderRange

Type
Array
Description
Slider range in format {min,max}.
sliderRange[] = {0,100};


sliderStep

Type
Number
Description
Size of the steps when slider is dragged, eg if sliderStep is 1 only integers are possible for the slider value.
sliderStep = 1;


T

Title

Type
Class
Description
n/a
class Title
{
	idc = -1;
	colorBase[] = {1,1,1,1};
	colorActive[] = {1,0.5,0,1};
};


V

Value

Type
Class
Description
n/a
class Value
{
	idc = 1200;
	format = "%.f";
	type = "SPTPlain";
	colorBase[] = {1,1,1,1};
	colorActive[] = {1,0.5,0,1};
};



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.

RscExample

class RscSlider
{
	deletable = 0;
	fade = 0;
	access = 0;
	type = CT_SLIDER;
	style = SL_HORZ;
	color[] = {1,1,1,0.8};
	colorActive[] = {1,1,1,1};
	shadow = 0;
	x = 0;
	y = 0;
	w = 0.3;
	h = 0.025;
};