DialogControls-Sliders: Difference between revisions
Jump to navigation
Jump to search
m (category) |
|||
Line 28: | Line 28: | ||
==CT_XSLIDER=43 or Embedded Scrollbar Class== | ==CT_XSLIDER=43 or Embedded Scrollbar Class== | ||
Embedded scrollbar classes (such as those in listboxes | Embedded scrollbar classes (such as those in listboxes) use the xbox properties as per a CT_XSLIDER | ||
{|class="wikitable" width="40%" border="1" align="left" cellpadding="3" cellspacing="0" | | {|class="wikitable" width="40%" border="1" align="left" cellpadding="3" cellspacing="0" | | ||
Line 108: | Line 108: | ||
sliderStep = 1;//Size of step when dragging | sliderStep = 1;//Size of step when dragging | ||
};</syntaxhighlight> | };</syntaxhighlight> | ||
=Helpful Script Commands= | =Helpful Script Commands= | ||
'''[[sliderPosition]], [[sliderRange]], [[sliderSetPosition]], [[sliderSetRange]], [[sliderSetSpeed]], [[sliderSpeed]]''' | '''[[sliderPosition]], [[sliderRange]], [[sliderSetPosition]], [[sliderSetRange]], [[sliderSetSpeed]], [[sliderSpeed]]''' | ||
[[Category: Dialogs|Sliders]] | [[Category: Dialogs|Sliders]] |
Revision as of 17:23, 10 March 2020
General
- 'Sliders' and 'ScrollBars' are synonymous.
- Default scrollbars are vertical. Use ST_HORZ to change orientation.
- Embedded child scrollbars are created by the engine as and when required for various control types. (CT_LISTBOX eg). The engine generates it's own idc for them. In most cases you can alter characteristics of that auto-generated scrollbar via class ScrollBar
CT_SLIDER=3 (deprecated)
Properties | ||
---|---|---|
Name | Type | Remark |
coloractive | color array | color of the arrows. |
Title/Value | classes | Optional and probably script only related |
CT_XSLIDER=43 or Embedded Scrollbar Class
Embedded scrollbar classes (such as those in listboxes) use the xbox properties as per a CT_XSLIDER
Properties | ||
---|---|---|
Name | Type | Remark |
arrowEmpty/Full | textures | |
border | texture | |
colorActive | color | color of the arrows. |
colorDisabled | color | |
thumb | texture | |
vspacing | float | |
Title/Value | classes | Optional probably irrelevant as script only related |
Title or Value class
Properties | ||
---|---|---|
Name | Type | Remark |
idc | integer | |
colorBase | color array | |
colorActive | color array |
- Example Config:
class MySlider
{
idc = -1;
type = CT_SLIDER;
style = SL_HORZ;
x = 0.4;
y = 0.2;
w = 0.3;
h = 0.025;
color[] = { 1, 1, 1, 1 };
coloractive[] = { 1, 0, 0, 0.5 };
// This is an ctrlEventHandler to show you some response if you move the sliderpointer.
onSliderPosChanged = "hint format[""%1"",_this];";
sliderPosition = 500;//Initial position when slider is created
sliderRange[] = {50,2000};//Min and max value of the slider
sliderStep = 1;//Size of step when dragging
};
Helpful Script Commands
sliderPosition, sliderRange, sliderSetPosition, sliderSetRange, sliderSetSpeed, sliderSpeed