DialogControls-Combo: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "float" to "Float ") |
(→CT_COMBO Type=4: class Items info added) |
||
Line 55: | Line 55: | ||
| '''soundSelect''' | | '''soundSelect''' | ||
| sound array | | sound array | ||
| Maybe the sound if an item is selected. '' | | Maybe the sound if an item is selected. ''doesn't work at this time'' | ||
|- | |- | ||
| '''soundExpand''' | | '''soundExpand''' | ||
| sound array | | sound array | ||
| Maybe the sound if the box expand. '' | | Maybe the sound if the box expand. ''doesn't work at this time'' | ||
|- | |- | ||
| '''soundCollapse''' | | '''soundCollapse''' | ||
| sound array | | sound array | ||
| Maybe the sound if the box collapse. '' | | Maybe the sound if the box collapse. ''doesn't work at this time'' | ||
|- | |- | ||
| '''ComboScrollBar''' | | '''ComboScrollBar''' | ||
Line 72: | Line 72: | ||
| [[Float]] | | [[Float]] | ||
| the height of the elapsed box. | | the height of the elapsed box. | ||
|- | |||
| '''Items''' | |||
| Class | |||
| Listing subclasses is the same as executing [[lbAdd]] | |||
|- | |||
|}<br clear="all"> | |||
{|class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" | | |||
! colspan="3" bgcolor="#bbbbff" | Items | |||
|- | |||
! bgcolor="#ddddff" | Name | |||
! bgcolor="#ddddff" | Type | |||
! bgcolor="#ddddff" | Remark | |||
|- | |||
| '''text''' | |||
| [[String]] | |||
| Displayed text (equal to [[lbAdd]]) | |||
|- | |||
| '''value''' | |||
| [[Number]] | |||
| Value of the entry (equal to [[lbSetValue]]) | |||
|- | |||
| '''data''' | |||
| [[String]] | |||
| Data of the entry (equal to [[lbSetData]]) | |||
|- | |||
| '''picture''' | |||
| [[String]] | |||
| Picture displayed on the left (equal to [[lbSetPicture]]) | |||
|- | |||
| '''pictureRight''' | |||
| [[String]] | |||
| Picture displayed on the right (equal to [[lbSetPictureRight]]) | |||
|- | |||
| '''default''' | |||
| [[Number]] | |||
| Sets this entry as the by default selected (equal to [[lbSetCurSel]]) | |||
|- | |||
| '''color''' | |||
| [[Color]] | |||
| Text color of the entry (equal to [[lbSetColor]]) | |||
|- | |||
| '''tooltip''' | |||
| [[String]] | |||
| Tooltip of the entry (equal to [[lbSetTooltip]]) | |||
|- | |- | ||
|}<br clear="all"> | |}<br clear="all"> |
Revision as of 13:38, 22 September 2020
CT_COMBO Type=4
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. doesn't work at this time |
soundExpand | sound array | Maybe the sound if the box expand. doesn't work at this time |
soundCollapse | sound array | Maybe the sound if the box collapse. doesn't work at this time |
ComboScrollBar | class | see DialogControls-Sliders |
wholeHeight | Float | the height of the elapsed box. |
Items | Class | Listing subclasses is the same as executing lbAdd |
Items | ||
---|---|---|
Name | Type | Remark |
text | String | Displayed text (equal to lbAdd) |
value | Number | Value of the entry (equal to lbSetValue) |
data | String | Data of the entry (equal to lbSetData) |
picture | String | Picture displayed on the left (equal to lbSetPicture) |
pictureRight | String | Picture displayed on the right (equal to lbSetPictureRight) |
default | Number | Sets this entry as the by default selected (equal to lbSetCurSel) |
color | Color | Text color of the entry (equal to lbSetColor) |
tooltip | String | Tooltip of the entry (equal to lbSetTooltip) |
- Example Config:
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
};
};
};
Example (A3 1.28 Template)
- Example Config:
class _CT_COMBO
{
access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified)
idc = CT_COMBO; // Control identification (without it, the control won't be displayed)
type = CT_COMBO; // Type is 4
style = ST_LEFT + LB_TEXTURES; // Style
default = 0; // Control selected by default (only one within a display can be used)
blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect.
x = 1 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal coordinates
y = 9 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical coordinates
w = 10 * GUI_GRID_CENTER_W; // Width
h = 1 * GUI_GRID_CENTER_H; // Height
colorBackground[] = {0.2,0.2,0.2,1}; // Fill color
colorSelectBackground[] = {1,0.5,0,1}; // Selected item fill color
sizeEx = GUI_GRID_CENTER_H; // Text size
font = GUI_FONT_NORMAL; // Font from CfgFontFamilies
shadow = 0; // Shadow (0 - none, 1 - N/A, 2 - black outline)
colorText[] = {1,1,1,1}; // Text and frame color
colorDisabled[] = {1,1,1,0.5}; // Disabled text color
colorSelect[] = {1,1,1,1}; // Text selection color
pictureColor[] = {1,0.5,0,1}; // Picture color
pictureColorSelect[] = {1,1,1,1}; // Selected picture color
pictureColorDisabled[] = {1,1,1,0.5}; // Disabled picture color
tooltip = "CT_COMBO"; // Tooltip text
tooltipColorShade[] = {0,0,0,1}; // Tooltip background color
tooltipColorText[] = {1,1,1,1}; // Tooltip text color
tooltipColorBox[] = {1,1,1,1}; // Tooltip frame color
arrowEmpty = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_ca.paa"; // Expand arrow
arrowFull = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_active_ca.paa"; // Collapse arrow
wholeHeight = 5 * GUI_GRID_CENTER_H; // Maximum height of expanded box (including the control height)
maxHistoryDelay = 1; // Time since last keyboard type search to reset it
soundExpand[] = {"\A3\ui_f\data\sound\RscCombo\soundExpand",0.1,1}; // Sound played when the list is expanded
soundCollapse[] = {"\A3\ui_f\data\sound\RscCombo\soundCollapse",0.1,1}; // Sound played when the list is collapsed
soundSelect[] = {"\A3\ui_f\data\sound\RscCombo\soundSelect",0.1,1}; // Sound played when an item is selected
// Scrollbar configuration (applied only when LB_TEXTURES style is used)
class ComboScrollBar
{
width = 0; // width of ComboScrollBar
height = 0; // height of ComboScrollBar
scrollSpeed = 0.01; // scrollSpeed of ComboScrollBar
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; // Arrow
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; // Arrow when clicked on
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; // Slider background (stretched vertically)
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; // Dragging element (stretched vertically)
color[] = {1,1,1,1}; // Scrollbar color
};
onCanDestroy = "systemChat str ['onCanDestroy',_this]; true";
onDestroy = "systemChat str ['onDestroy',_this]; false";
onSetFocus = "systemChat str ['onSetFocus',_this]; false";
onKillFocus = "systemChat str ['onKillFocus',_this]; false";
onKeyDown = "systemChat str ['onKeyDown',_this]; false";
onKeyUp = "systemChat str ['onKeyUp',_this]; false";
onMouseButtonDown = "systemChat str ['onMouseButtonDown',_this]; false";
onMouseButtonUp = "systemChat str ['onMouseButtonUp',_this]; false";
onMouseButtonClick = "systemChat str ['onMouseButtonClick',_this]; false";
onMouseButtonDblClick = "systemChat str ['onMouseButtonDblClick',_this]; false";
onMouseZChanged = "systemChat str ['onMouseZChanged',_this]; false";
onMouseMoving = "";
onMouseHolding = "";
onLBSelChanged = "systemChat str ['onLBSelChanged',_this]; false";
};