DialogControls-Combo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "#redirect " to "#REDIRECT ")
 
(17 intermediate revisions by 9 users not shown)
Line 1: Line 1:
==CT_COMBO Type=4==
#REDIRECT [[CT_COMBO]]
 
'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. '''
 
{| border="1" align="left" cellpadding="3" cellspacing="0" |
! colspan="3" bgcolor="#bbbbff" | Properties
|-
! bgcolor="#ddddff" | Name
! bgcolor="#ddddff" | Type
! bgcolor="#ddddff" | Remark
|-
| '''ArrowEmpty/Full'''
| texture
|
|-
| '''color*'''
| color
| color of the control surrounding lines.
|-
| '''colorActive'''
| color
|
| '''colorDisabled'''
| color
|
|-
| '''colorScrollBar'''
| color
|
|-
| '''colorSelect'''
| color array
| color of selected text.
|-
| '''colorSelectBackground*'''
| color array
| background color of selected lines.
|-
| '''from'''
| number
| 1980
|-
| '''to'''
| number
| 2020
|-
| '''maxHistoryDelay'''
| float
|
|-
| '''rowHeight*'''
| float
| the height of a single row in the elapsed box.
|-
| '''soundSelect'''
| sound array
| Maybe the sound if an item is selected. ''don't work at this time''
|-
| '''soundExpand'''
| sound array
| Maybe the sound if the box expand. ''don't work at this time''
|-
| '''soundCollapse'''
| sound array
| Maybe the sound if the box collapse. ''don't work at this time''
|-
| '''ScrollBar'''
| class
| see [[ControlDialogs-Sliders]]
|-
| '''wholeHeight'''
| float
| the height of the elapsed box.
|-
|}<br clear="all">
 
'''Notice:'''
 
This seems to be a kind of listbox, so use the '''lb*''' commands like '''[[lbAdd]]''' or '''[[lbSetSelected index|lbSetSelected]]''' to work with this control.
 
 
[[Image:ControlCombo.JPG|thumb|200px|A ComboBox Control from example code]]
 
==example==
 
<code><nowiki>
class RscCombo
{
access = 0;
type = CT_COMBO;
style = ST_LEFT;
h = 0.05;
wholeHeight = 0.25;
colorSelect[] = {0.6,0.6,0.6,1};
colorText[] = {1,1,1,1};
colorBackground[] = {0.2,0.2,0.2,1};
colorScrollbar[] = {1,1,1,1};
font = "TahomaB";
sizeEx = 0.04;
soundSelect[] = {"",0.1,1};
soundExpand[] = {"",0.1,1};
soundCollapse[] = {"",0.1,1};
maxHistoryDelay = 1.0;
shadow = 0;
class ScrollBar
{
  color[] = {1,1,1,0.6};
  colorActive[] = {1,1,1,1};
  colorDisabled[] = {1,1,1,0.3};
  thumb = "#(argb,8,8,3)color(1,1,1,1)";
  arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
  arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
  border = "#(argb,8,8,3)color(1,1,1,1)";
  shadow = 0;
};
};
 
class dialog
{
class controls
{
  class Values: RscCombo
  {
  idc = 102;
  x = 0.3025;
  y = 0.14;
  w = 0.1375;
  h = 0.03;
  sizeEx = 0.025;
  rowHeight = 0.025;
  wholeHeight = 4 * 0.025; // 3 lines to display + 1 line of the unelapsed control
  };
};
};</nowiki></code>
[[Category: Dialogs]]

Latest revision as of 13:36, 30 December 2020

Redirect to: