DialogControls-ListBoxes: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (disamb)
 
(43 intermediate revisions by 9 users not shown)
Line 1: Line 1:
===CT_LISTBOX=5===
{{Wiki|disamb}}
===CT_XLISTBOX=42===
===CT_LISTNBOX=102===


'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here.'''
* [[CT_LISTBOX]]
 
* [[CT_XLISTBOX]]
Notes for future:
* [[CT_LISTNBOX]]
 
* [[CT_XCOMBO]]
For list boxes, the usage of 'ST_' style constants (ST_MULTI & ST_TITLE_BAR) behave differently than expected for other controls, so use the corresponding 'LB_' (LB_TEXTURES & LB_MULTI) list box style variants instead.
 
style = LB_TEXTURES; // solid scrollbar
style = LB_MULTI; // multiple item selection
 
{| border="1" align="left" cellpadding="3" cellspacing="0" |
! colspan="3" bgcolor="#bbbbff" | Properties
! colspan="3" bgcolor="#bbbbff" | Applies to
|-
! bgcolor="#ddddff" | Name
! bgcolor="#ddddff" | Type
! bgcolor="#ddddff" | Remark
! bgcolor="#ddddff" | 5
! bgcolor="#ddddff" | 42
! bgcolor="#ddddff" | 102
|-
| '''active'''
| boolean
|
| x
|
|
|-
| '''autoScroll...'''
| integers
| applies to Speed,Delay,Rewind
| x
|
| x
|-
| '''arrowEmpty/Full'''
| color
|
| x
| x
| x
|-
| '''border'''
| texture
|
|
| x
|
|-
| '''canDrag'''
| boolean
|
| x
|
| x
|-
| '''collisionColor'''
| color
|
| x
|
|
|-
| '''colorScrollbar'''
| color
|
| x
|
|
|-
| '''color'''
| color
|
|
|
| x
|-
| '''colorPlayerItem'''
| color
|
|
|
| x
|-
| '''colorActive'''
| color
|
|
| x
|
|-
| '''colorDisabled'''
| color
|
|
| x
|
|-
| '''colorSelect'''
| color
|
| x
| x
| x
|-
| '''colorSelect2'''
| color
|
| x
|
| x
|-
| '''colorSelectBackground'''
| color
|
| x
|
| x
|-
| '''colorSelectBackground2'''
| color
|
| x
|
| x
|-
| '''columns'''
| float array
| define the left starting position of each column. The values are offsets ratios (not spacing ratios). Tip: Use {-0.01} in first column to fix unwanted offset, if desired.
|
|
| x
|-
| '''disabled/enabled'''
| boolean
|
| x
|
|
|-|
| '''disabledCtrlColor'''
| color
|
| x
|
|
|-
| '''disabledKeyColor'''
| color
|
| x
|
|
|-
| '''drawSideArrows'''
| boolean
| Each row can be linked to 2 arrow buttons which are shown on the left and right of the row.
|
|
| x
|-
| '''idcLeft/Right'''
| integer
| the IDC of the control to be used for the left/right button.
|
|
| x
|-
| '''mainCollumW'''
| float
|
| x
|
|
|-
| '''secndCollumW'''
| float
|
| x
|
|
|-
| '''LineSpacing'''
| float
|
|
|
| x
|-
| '''maxHistoryDelay'''
| float
|
| x
|
| x
|-
| '''period'''
| float?
| probably flash period
| x
|
| x
|-
| '''rowHeight'''
| float
| the height of a single row in the elapsed box.
| x
|
| x
|-
| '''rows'''
| integer
|
| x
|
|
|-
| '''SoundSelect'''
| class
|
| x
| x
| x
|-
| '''ScrollBar'''
| class
| see [[DialogControls-Sliders]]
| x
|
| x
|-
| '''xColumn1,2,3'''
| float
|
|
|
| x
|-
|}<br clear="all">
 
RscListNBox
 
*Using -1 for idcLeft/idcRight will use the full row width. Using a valid idc will reserve sides for arrows and link with those controls.
 
*idcLeft/idcRight bug?: Using -1 for either idc will link to first control with an idc using -1, instead of treating it as an unused idc. Workaround: number every idc in dialog rather than leaving any idc as -1.
 
==Examples==
===RscListBox===
<code><nowiki>
class RscListBox
{
access = 0;
type = 5;
style = 0;
w = 0.4;
h = 0.4;
font = "TahomaB";
sizeEx = 0.04;
rowHeight = 0;
colorText[] = {1,1,1,1};
colorScrollbar[] = {1,1,1,1};
colorSelect[] = {0,0,0,1};
colorSelect2[] = {1,0.5,0,1};
colorSelectBackground[] = {0.6,0.6,0.6,1};
colorSelectBackground2[] = {0.2,0.2,0.2,1};
colorBackground[] = {0,0,0,1};
maxHistoryDelay = 1.0;
soundSelect[] = {"",0.1,1};
period = 1;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
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;
};
};
</nowiki></code>
 
===RscXListBox===
class RscXListBox
{
type = 42;
color[] = {1,1,1,0.6};
colorActive[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.3};
arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
arrowFull = "#(argb,8,8,3)color(1,0.5,0,1)";
border = "#(argb,8,8,3)color(0,0,0,1)";
colorSelect[] = {1,1,1,1};
colorText[] = {1,1,1,0.8};
soundSelect[] = {"",0.1,1};
};</nowiki></code>
 
===RscListNBox===
class RscListNBox
{
  access = 0; // allow alterations / additions to, but not erasure of, tokennames in this class.
              // this equally affects child classes. they cannot be removed, nor can their tokenNames be erased, only altered
              // to completely remove or alter a child class (in this case scrollbar), this parent class must be inherited
              // then again, perhaps irrelevant, perhaps it's simply being a root class that causes all this
/*
** standard stuff
*/
  type = CT_LISTNBOX;// 102;
  style =ST_MULTI;
  w = 0.4;  h = 0.4;
  font = "TahomaB";
  sizeEx = 0.04;
  colorText[] = {0.8784, 0.8471, 0.651, 1};
  colorBackground[] = {0, 0, 0, 1};
/*
** type specific
*/
  autoScrollSpeed = -1;
  autoScrollDelay = 5;
  autoScrollRewind = 0;
  arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
  arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
  columns[] = {0.3, 0.6, 0.7};
  color[] = {1, 1, 1, 1};
  colorScrollbar[] = {0.95, 0.95, 0.95, 1};
  colorSelect[] = {0.95, 0.95, 0.95, 1};
  colorSelect2[] = {0.95, 0.95, 0.95, 1};
  colorSelectBackground[] = {0, 0, 0, 1};
  colorSelectBackground2[] = {0.8784, 0.8471, 0.651, 1};
  drawSideArrows = 0;
  idcLeft = -1;
  idcRight = -1;
  maxHistoryDelay = 1;
  rowHeight = 0;
  soundSelect[] = {"", 0.1, 1};
  period = 1;
  shadow = 2;
  class ScrollBar
  {
  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)";
  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)";
  };
};
class dialog
{
  class controls
  {
    class MyLbox:RscListNBox
    {
        x=y=wherever;
        canDrag=true;
        rows=10;
        lineSpacing = 1.3;
    };
  };
};
[[Category: Dialogs]]

Latest revision as of 14:38, 7 February 2021

Disambiguation
This disambiguation page lists articles associated with the same title.