DialogControls-ListBoxes: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
Line 38: Line 38:
|-
|-
| '''arrowEmpty/Full'''
| '''arrowEmpty/Full'''
| color array
| color
|
|
| x
| x
Line 45: Line 45:
|-
|-
| '''border'''
| '''border'''
| argb array
| texture
|
|
|  
|  
Line 59: Line 59:
|-
|-
| '''collisionColor'''
| '''collisionColor'''
| color array
| color  
|
|
| x
| x
Line 66: Line 66:
|-
|-
| '''colorScrollbar'''
| '''colorScrollbar'''
| color array
| color  
|
|
| x
| x
Line 73: Line 73:
|-
|-
| '''color'''
| '''color'''
| color array
| color  
|
|
|  
|  
Line 80: Line 80:
|-
|-
| '''colorPlayerItem'''
| '''colorPlayerItem'''
| color array
| color  
|
|
|  
|  
Line 87: Line 87:
|-
|-
| '''colorActive'''
| '''colorActive'''
| color array
| color  
|
|
|  
|  
Line 94: Line 94:
|-
|-
| '''colorDisabled'''
| '''colorDisabled'''
| color array
| color  
|
|
|  
|  
Line 101: Line 101:
|-
|-
| '''colorSelect'''
| '''colorSelect'''
| color array
| color  
|
|
| x
| x
Line 108: Line 108:
|-
|-
| '''colorSelect2'''
| '''colorSelect2'''
| color array
| color  
|
|
| x
| x
Line 115: Line 115:
|-
|-
| '''colorSelectBackground'''
| '''colorSelectBackground'''
| color array
| color  
|
|
| x
| x
Line 122: Line 122:
|-
|-
| '''colorSelectBackground2'''
| '''colorSelectBackground2'''
| color array
| color  
|
|
| x
| x
Line 143: Line 143:
|-|  
|-|  
| '''disabledCtrlColor'''
| '''disabledCtrlColor'''
| color array
| color  
|
|
| x
| x
Line 150: Line 150:
|-
|-
| '''disabledKeyColor'''
| '''disabledKeyColor'''
| color array
| color  
|
|
| x
| x

Revision as of 07:51, 30 January 2012

CT_LISTBOX=5

CT_XLISTBOX=42

CT_LISTNBOX=102

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

Notes for future:

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
Properties Applies to
Name Type Remark 5 42 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
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 x x
xColumn1,2,3 float x


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

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; }; }; ===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}; };

RscListNBox

class RscListNBox
{
 access = 0; //allow alterations / additions to, but not erasure of tokennames in this class
 type = CT_LISTNBOX;// 102; 
 style =ST_MULTI;
 w = 0.4;   h = 0.4; 
 font = "TahomaB"; 
 sizeEx = 0.04; 
 rowHeight = 0; 
 colorText[] = {0.8784, 0.8471, 0.651, 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}; 
 colorBackground[] = {0, 0, 0, 1}; 
 maxHistoryDelay = 1; 
 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)"; 
 drawSideArrows = 0; 
 columns[] = {0.3, 0.6, 0.7}; 
 idcLeft = -1; 
 idcRight = -1; 
 shadow = 2; 
 color[] = {1, 1, 1, 1}; 

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