DialogControls-ListBoxes: Difference between revisions
m (→RscXListBox) |
|||
Line 183: | Line 183: | ||
| | | | ||
| | | | ||
|- | |||
| '''LineSpacing''' | |||
| float | |||
| | |||
| | |||
| | |||
| x | |||
|- | |- | ||
| '''maxHistoryDelay''' | | '''maxHistoryDelay''' | ||
Line 221: | Line 228: | ||
| '''ScrollBar''' | | '''ScrollBar''' | ||
| class | | class | ||
| | | see [[DialogControls-Sliders]] | ||
| x | | x | ||
| | | |
Revision as of 08:28, 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 | |||
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 |
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}; };</nowiki>
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; }; }; };