DialogControls-ListBoxes: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Created page with "===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 ...")
 
Line 241: Line 241:
*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.
*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:'''
==Examples==
===RscListBox===
<code><nowiki>
<code><nowiki>
class RscListBox
class RscListBox
Line 282: Line 283:
};
};


===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
class RscListNBox
{
{
access = 0;
  access = 0; //allow alterations / additions to, but not erasure of tokennames in this class
type = 102;
  type = CT_LISTNBOX;// 102;  
style = 0;
  style =ST_MULTI;
w = 0.4;
  w = 0.4;   h = 0.4;  
h = 0.4;
  font = "TahomaB";  
font = "TahomaB";
  sizeEx = 0.04;  
sizeEx = 0.04;
  rowHeight = 0;  
rowHeight = 0;
  colorText[] = {0.8784, 0.8471, 0.651, 1};  
colorText[] = {1,1,1,1};
  colorScrollbar[] = {0.95, 0.95, 0.95, 1};  
colorScrollbar[] = {1,1,1,1};
  colorSelect[] = {0.95, 0.95, 0.95, 1};  
colorSelect[] = {0,0,0,1};
  colorSelect2[] = {0.95, 0.95, 0.95, 1};  
colorSelect2[] = {1,0.5,0,1};
  colorSelectBackground[] = {0, 0, 0, 1};  
colorSelectBackground[] = {0.6,0.6,0.6,1};
  colorSelectBackground2[] = {0.8784, 0.8471, 0.651, 1};  
colorSelectBackground2[] = {0.2,0.2,0.2,1};
  colorBackground[] = {0, 0, 0, 1};  
colorBackground[] = {0,0,0,1};
  maxHistoryDelay = 1;  
maxHistoryDelay = 1.0;
  soundSelect[] = {"", 0.1, 1};  
soundSelect[] = {"",0.1,1};
  period = 1;  
period = 1;
  autoScrollSpeed = -1;  
autoScrollSpeed = -1;
  autoScrollDelay = 5;  
autoScrollDelay = 5;
  autoScrollRewind = 0;  
autoScrollRewind = 0;
  arrowEmpty = "#(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)";  
arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
  drawSideArrows = 0;  
drawSideArrows = 0;
  columns[] = {0.3, 0.6, 0.7};  
columns[] = {0.3,0.6,0.7};
  idcLeft = -1;  
idcLeft = -1;
  idcRight = -1;  
idcRight = -1;
  shadow = 2;
shadow = 0;
  color[] = {1, 1, 1, 1};  
 
  class ScrollBar
  class ScrollBar
  {
  {
Line 325: Line 342:
};
};


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>
[[Category: Dialogs]]
[[Category: Dialogs]]

Revision as of 07:41, 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 array x x x
border argb array x
canDrag boolean x x
collisionColor color array x
colorScrollbar color array x
color color array x
colorPlayerItem color array x
colorActive color array x
colorDisabled color array x
colorSelect color array x x x
colorSelect2 color array x x
colorSelectBackground color array x x
colorSelectBackground2 color array 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 array x
disabledKeyColor color array 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;
};

};