DialogControls-Sliders: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Created page with "'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here.''' ===CT_SLIDER=3=== {| border="1" align="left" cellpadding="3" cellspacing="0" | ! colsp...")
 
Line 49: Line 49:
|}<br clear="all">
|}<br clear="all">


===CT_XSLIDER=43===
===CT_XSLIDER=43 or Embedded Scrollbar Class===
 
Embedded scrollbar classes (such as those in listboxes eg) use the xbox properties as per a CT_XSLIDER


{| border="1" align="left" cellpadding="3" cellspacing="0" |
{| border="1" align="left" cellpadding="3" cellspacing="0" |
Line 58: Line 60:
! bgcolor="#ddddff" | Remark
! bgcolor="#ddddff" | Remark
|-
|-
| '''style'''
| '''arrowEmpty'''
| integer
| texture
|
|-
| '''arrowFull'''
| texture
|  
|  
|-
|-
| '''coloractive'''
| '''border'''
| color array
| texture
| color of the arrows.
|-
| '''colorDisable'''
| color array
|  
|  
|-
|-
| '''arrowEmpty'''
| '''colorActive'''
| color array
| color
|
| color of the arrows.
|-
|-
| '''arrowFull'''
| '''colorDisabled'''
| color array
| color
|  
|  
|-
|-
| '''border'''
| '''style'''
| color array
| integer
|  
|  
|-
|-
| '''thumb'''
| '''thumb'''
| color array
| texture
|
|
|-
|-

Revision as of 08:36, 30 January 2012

TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here.

CT_SLIDER=3

Properties
Name Type Remark
style integer generally 1024
coloractive color array color of the arrows.
Title class
Value class


Title or Value class

Properties
Name Type Remark
idc integer
colorBase color array
colorActive color array


CT_XSLIDER=43 or Embedded Scrollbar Class

Embedded scrollbar classes (such as those in listboxes eg) use the xbox properties as per a CT_XSLIDER

Properties
Name Type Remark
arrowEmpty texture
arrowFull texture
border texture
colorActive color color of the arrows.
colorDisabled color
style integer
thumb texture
vspacing float



Notice:

You can change the orientation of the slider with the style constants SL_HORZ and SL_VERT.

A Slider Control
  • Example:

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];"; };

  • Helpful Script Commands:

sliderPosition, sliderRange, sliderSetPosition, sliderSetRange, sliderSetSpeed, sliderSpeed