CT TOOLBOX: Difference between revisions
Killzone Kid (talk | contribs) (Redirected page to DialogControls-Toolbox) |
Killzone Kid (talk | contribs) No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
# | [[Category: Control Types]] | ||
{{CT|intro | |||
|macro = CT_TOOLBOX | |||
|value = 6 | |||
|description =A Toolbox is a set of options, ordered by columns and rows. Only one can be active at a time and one is always selected (the first one by default). For Toolbox with multiple selections see [[CT_CHECKBOXES]].<br> | |||
|gallery=File:CToolBox.jpg{{!}}A [[CT_TOOLBOX]] control with the 5th entry selected. | |||
File:CToolBox_picture.jpg{{!}}The toolbox can be set to display images instead too. | |||
|commands = | |||
* [[:Category:Command_Group:_GUI_Control_-_ListBox|Commands: Listbox]] | |||
|events = | |||
* [[User_Interface_Event_Handlers#Listbox_events|Events: Listbox]] | |||
}} | |||
{{CT|abc start}} | |||
=== C === | |||
{{CT|attribute | |||
|name=checked_strings | |||
|type1=Array | |||
|value1={"[Entry 1]","[Entry 2]","[Entry 3]","[Entry 4]","[Entry 5]","[Entry 6]"} | |||
|description=Options texts to display when an option is selected. | |||
}} | |||
{{CT|attribute | |||
|name=color | |||
|type1=Array | |||
|value1={0.95,0.95,0.95,1} | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=colorBackground | |||
|type1=Array | |||
|value1={0.95,0.95,0.95,1} | |||
|description=Color of the background when option is not selected. | |||
}} | |||
{{CT|attribute | |||
|name=colorDisable | |||
|type1=Array | |||
|value1={0,0,0,0} | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=colorSelect | |||
|type1=Array | |||
|value1={0.95,0.95,0.95,1} | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=colorSelectedBg | |||
|type1=Array | |||
|value1={"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",0.5} | |||
|description=Color of the background when option is selected. | |||
}} | |||
{{CT|attribute | |||
|name=colorTextDisable | |||
|type1=Array | |||
|value1={0.4,0.4,0.4,1} | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=colorTextSelect | |||
|type1=Array | |||
|value1={1,1,1,1} | |||
|description=Color of the selected option text. | |||
}} | |||
{{CT|attribute | |||
|name=columns | |||
|type1=Number | |||
|value1=3 | |||
|type2=String | |||
|value2="4 - 1" | |||
|description=Amount of columns to arrange options into. | |||
}} | |||
=== N === | |||
{{CT|attribute | |||
|name=names | |||
|type1=Array | |||
|value1={"MOVE","GETOUT","UNLOAD","TR UNLOAD","%1/cfgWaypoints/A3/Land","%1/cfgWaypoints/A3/Artillery","UNHOOK"} | |||
|description= | |||
}} | |||
=== R === | |||
{{CT|attribute | |||
|name=rows | |||
|type1=Number | |||
|value1=2 | |||
|description=Amount of rows to arrange options into. | |||
}} | |||
=== S === | |||
{{CT|attribute | |||
|name=strings | |||
|type1=Array | |||
|value1={"100m","200m","500m"} | |||
|description=Options texts to display. | |||
}} | |||
=== T === | |||
{{CT|attribute | |||
|name=tooltips | |||
|type1=Array | |||
|value1={"Objects","Compositions","Triggers","Systems","Markers"} | |||
|description=Tooltips for each option. | |||
}} | |||
=== V === | |||
{{CT|attribute | |||
|name=values | |||
|type1=Array | |||
|value1={0,1,2,3,4,5,6} | |||
|description=Numerical values associated with items. Can be retrieved or set with [[lbValue]] and [[lbSetValue]]. | |||
}} | |||
{{CT|abc end}} | |||
{{CT|examples}} | |||
=== RscExample === | |||
<syntaxhighlight lang="cpp"> | |||
class RscToolbox | |||
{ | |||
deletable = 0; | |||
fade = 0; | |||
access = 0; | |||
type = CT_TOOLBOX; | |||
style = ST_CENTER; | |||
colorText[] = {0.95,0.95,0.95,1}; | |||
color[] = {0.95,0.95,0.95,1}; | |||
colorTextSelect[] = {0.95,0.95,0.95,1}; | |||
colorSelect[] = {0.95,0.95,0.95,1}; | |||
colorTextDisable[] = {0.4,0.4,0.4,1}; | |||
colorDisable[] = {0.4,0.4,0.4,1}; | |||
colorSelectedBg[] = | |||
{ | |||
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])", | |||
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])", | |||
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])", | |||
0.5 | |||
}; | |||
shadow = 0; | |||
strings[] = | |||
{ | |||
"", | |||
"" | |||
}; | |||
x = 0; | |||
y = 0; | |||
w = 0.3; | |||
h = 0.025; | |||
rows = 1; | |||
columns = 2; | |||
font = "RobotoCondensed"; | |||
sizeEx = GUI_TEXT_SIZE_SMALL; | |||
}; | |||
</syntaxhighlight> |
Latest revision as of 12:04, 12 June 2021
Control Types / MACRO (TYPE VALUE) | |
---|---|
Text/Image/Video |
CT_STATIC (0) | CT_EDIT (2) | CT_HTML (9) | CT_STRUCTURED_TEXT (13) |
Buttons |
CT_BUTTON (1) | CT_ACTIVETEXT (11) | CT_SHORTCUTBUTTON (16) | CT_CHECKBOX (77) | CT_XBUTTON (41) |
Lists |
CT_COMBO (4) | CT_TOOLBOX (6) | CT_CHECKBOXES (7) | CT_TREE (12) | CT_CONTROLS_TABLE (19) | CT_XCOMBO (44) | CT_LISTBOX (5) | CT_LISTNBOX (102) | CT_LISTNBOX_CHECKABLE (104) | CT_XLISTBOX (45) |
3D Objects |
CT_OBJECT (80) | CT_OBJECT_ZOOM (81) | CT_OBJECT_CONTAINER (82) | CT_OBJECT_CONT_ANIM (83) |
Maps |
CT_MAP (100) | CT_MAP_MAIN (101) |
Meta |
CT_SLIDER (3) | CT_XSLIDER (43) | CT_PROGRESS (8) | CT_CONTROLS_GROUP (15) | CT_WEBBROWSER (106) | CT_EXTENSION (107) |
Menu |
CT_CONTEXT_MENU (14) | CT_MENU (46) | CT_MENU_STRIP (47) |
Unknown |
CT_STATIC_SKEW (10) | CT_HITZONES (17) | CT_VEHICLETOGGLES (18) | CT_XKEYDESC (40) | CT_ANIMATED_TEXTURE (45) | CT_LINEBREAK (98) | CT_USER (99) | CT_ITEMSLOT (103) | CT_VEHICLE_DIRECTION (105) |
Introduction
A Toolbox is a set of options, ordered by columns and rows. Only one can be active at a time and one is always selected (the first one by default). For Toolbox with multiple selections see CT_CHECKBOXES.
Related commands & functions
Related User Interface Eventhandlers
Alphabetical Order
#define CT_TOOLBOX 6
C
checked_strings
- Type
- Array
- Description
- Options texts to display when an option is selected.
checked_strings[] = {"[Entry 1]","[Entry 2]","[Entry 3]","[Entry 4]","[Entry 5]","[Entry 6]"};
color
- Type
- Array
- Description
- n/a
color[] = {0.95,0.95,0.95,1};
colorBackground
- Type
- Array
- Description
- Color of the background when option is not selected.
colorBackground[] = {0.95,0.95,0.95,1};
colorDisable
- Type
- Array
- Description
- n/a
colorDisable[] = {0,0,0,0};
colorSelect
- Type
- Array
- Description
- n/a
colorSelect[] = {0.95,0.95,0.95,1};
colorSelectedBg
- Type
- Array
- Description
- Color of the background when option is selected.
colorSelectedBg[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",0.5};
colorTextDisable
- Type
- Array
- Description
- n/a
colorTextDisable[] = {0.4,0.4,0.4,1};
colorTextSelect
- Type
- Array
- Description
- Color of the selected option text.
colorTextSelect[] = {1,1,1,1};
columns
Number example:
columns = 3;
String example:
columns = "4 - 1";
N
names
- Type
- Array
- Description
- n/a
names[] = {"MOVE","GETOUT","UNLOAD","TR UNLOAD","%1/cfgWaypoints/A3/Land","%1/cfgWaypoints/A3/Artillery","UNHOOK"};
R
rows
- Type
- Number
- Description
- Amount of rows to arrange options into.
rows = 2;
S
strings
- Type
- Array
- Description
- Options texts to display.
strings[] = {"100m","200m","500m"};
T
tooltips
- Type
- Array
- Description
- Tooltips for each option.
tooltips[] = {"Objects","Compositions","Triggers","Systems","Markers"};
V
values
- Type
- Array
- Description
- Numerical values associated with items. Can be retrieved or set with lbValue and lbSetValue.
values[] = {0,1,2,3,4,5,6};
Default Classes
RscExample
class RscToolbox
{
deletable = 0;
fade = 0;
access = 0;
type = CT_TOOLBOX;
style = ST_CENTER;
colorText[] = {0.95,0.95,0.95,1};
color[] = {0.95,0.95,0.95,1};
colorTextSelect[] = {0.95,0.95,0.95,1};
colorSelect[] = {0.95,0.95,0.95,1};
colorTextDisable[] = {0.4,0.4,0.4,1};
colorDisable[] = {0.4,0.4,0.4,1};
colorSelectedBg[] =
{
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
0.5
};
shadow = 0;
strings[] =
{
"",
""
};
x = 0;
y = 0;
w = 0.3;
h = 0.025;
rows = 1;
columns = 2;
font = "RobotoCondensed";
sizeEx = GUI_TEXT_SIZE_SMALL;
};