DialogControls-Combo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
Line 104: Line 104:
  maxHistoryDelay = 1.0;
  maxHistoryDelay = 1.0;
  shadow = 0;
  shadow = 0;
  class ScrollBar
  class ComboScrollBar : ScrollBar
  {
  {
   color[] = {1,1,1,0.6};
   color[] = {1,1,1,0.6};

Revision as of 13:24, 26 February 2014

CT_COMBO Type=4

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

Properties
Name Type 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 DialogControls-Sliders
wholeHeight float the height of the elapsed box.


Notice:

This seems to be a kind of listbox, so use the lb* commands like lbAdd or lbSetSelected to work with this control.


A ComboBox Control from example code

example

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