CT ACTIVETEXT: Difference between revisions
(page overhaul) Tag: Removed redirect |
Lou Montana (talk | contribs) m (Text replacement - " ( *class [a-zA-Z0-9_]+): *([a-zA-Z0-9_]+ *) " to " $1 : $2 ") |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category: Control Types]] | |||
{{CT|intro | {{CT|intro | ||
|macro = CT_ACTIVETEXT | |macro = CT_ACTIVETEXT | ||
|value = 11 | |value = 11 | ||
|description = The active text control behaves very similar to buttons. It shows up as regular text with the additional functionality that you can click and select it. The dialog's currently selected Active Text control will be underlined to indicate its status. By default, the first Active Text control is selected. When the mouse cursor hovers over an instance of this control, it will show up in the color defined in the ''colorActive'' property.<br> | |description = The active text control behaves very similar to buttons. It shows up as regular text with the additional functionality that you can click and select it. The dialog's currently selected Active Text control will be underlined to indicate its status. By default, the first Active Text control is selected. When the mouse cursor hovers over an instance of this control, it will show up in the color defined in the ''colorActive'' property. It is also possible to show a clickable image instead of text.<br> | ||
{{Feature|informative|If you need to show text and an image at the same time you can use [[CT_SHORTCUTBUTTON]].}} | |||
'''Notice:''' This control doesn't render the usually common ''colorBackground'' property and ''colorText'' is replaced with ''color''. | '''Notice:''' This control doesn't render the usually common ''colorBackground'' property and ''colorText'' is replaced with ''color''. | ||
*For Arrowhead, this is not true. The properties are there, and it might be an attempt to standardise, or to account for pictures | *For Arrowhead, this is not true. The properties are there, and it might be an attempt to standardise, or to account for pictures | ||
[[ | [[File:Dialog controls activetext.jpg]] | ||
|commands = | |commands = | ||
* [[:Category:Command_Group:_GUI_Control_- | * [[:Category:Command_Group:_GUI_Control_-_Buttons|Commands: Button (TODO)]] | ||
|events = | |events = | ||
* [[User_Interface_Event_Handlers# | * [[User_Interface_Event_Handlers#Button_Events|Commands: Button]] | ||
}} | }} | ||
Line 17: | Line 21: | ||
|name=action | |name=action | ||
|type1=String | |type1=String | ||
|value1="[finddisplay 26] call (uinamespace getvariable ' | |value1="[finddisplay 26] call (uinamespace getvariable 'BIS_fnc_help');" | ||
|description='''SQS''' code to execute when the control is clicked. | |description='''SQS''' code to execute when the control is clicked. | ||
{{ | {{Feature|important|Use [[User_Interface_Event_Handlers#onButtonClick|onButtonClick]] instead.}} | ||
}} | }} | ||
Line 288: | Line 292: | ||
=== RscActivePicture === | === RscActivePicture === | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
class RscActivePicture: RscActiveText | class RscActivePicture : RscActiveText | ||
{ | { | ||
style = ST_MULTI + ST_TITLE_BAR; | style = ST_MULTI + ST_TITLE_BAR; | ||
Line 298: | Line 302: | ||
=== RscActivePictureKeepAspect === | === RscActivePictureKeepAspect === | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
class RscActivePictureKeepAspect: RscActivePicture | class RscActivePictureKeepAspect : RscActivePicture | ||
{ | { | ||
style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO; | style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO; | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 10:57, 6 December 2023
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
The active text control behaves very similar to buttons. It shows up as regular text with the additional functionality that you can click and select it. The dialog's currently selected Active Text control will be underlined to indicate its status. By default, the first Active Text control is selected. When the mouse cursor hovers over an instance of this control, it will show up in the color defined in the colorActive property. It is also possible to show a clickable image instead of text.
Notice: This control doesn't render the usually common colorBackground property and colorText is replaced with color.
- For Arrowhead, this is not true. The properties are there, and it might be an attempt to standardise, or to account for pictures
Related commands & functions
Related User Interface Eventhandlers
Alphabetical Order
#define CT_ACTIVETEXT 11
A
action
- Type
- String
- Description
- SQS code to execute when the control is clicked.
action = "[finddisplay 26] call (uinamespace getvariable 'BIS_fnc_help');";
angle
- Type
- Number
- Description
- n/a
angle = 180;
B
blinkingPeriod
- Type
- Number
- Description
- Makes the text start transparent, go to full opacity and back to full transparent in the amount of time specified.
blinkingPeriod = 1.2;
C
canDrag
- Type
- Number
- Description
- n/a
canDrag = 1;
color
- Type
- Array
- Description
- Replaces colorText, standard text and underline color.
color[] = {1,1,1,0.7};
colorActive
- Type
- Array
- Description
- Text and underline color whenever the mouse hovers over the control.
colorActive[] = {1,1,1,1};
colorBackgroundSelected
- Type
- Array
- Description
- n/a
colorBackgroundSelected[] = {1,1,1,0.1};
colorFocused
- Type
- Array
- Description
- n/a
colorFocused[] = {0,0,0,0};
colorShade
- Type
- Array
- Description
- n/a
colorShade[] = {1,1,1,1};
D
default
- Type
- Number
- Description
- Whether or not this control is the dialog's initially selected active text.
default = 1;
DLCTemplate
- Type
- Class
- Description
- n/a
class DLCTemplate
{
class controls
{
class DlcBg
{
idc = 101;
text = "\A3\Ui_f\data\GUI\Rsc\RscDisplayInventory\InventoryStripe_ca.paa";
color[] = {1,1,1,1};
x = 0;
y = 0;
w = 1.8 * GUI_GRID_W;
h = 1.8 * GUI_GRID_H;
};
class DlcIcon
{
idc = 100;
text = "";
color[] = {1,1,1,1};
x = 0 * GUI_GRID_W;
y = 0 * GUI_GRID_H;
w = 1 * GUI_GRID_W;
h = 1 * GUI_GRID_H;
};
};
};
E
enabled
- Type
- Number
- Description
- n/a
enabled = 0;
P
picture
- Type
- String
- Description
- n/a
picture = "a3\ui_f\data\gui\rsc\rscdisplaymultiplayersetup\flag_opfor_empty_ca.paa";
pictureHeight
- Type
- Number
- Description
- n/a
pictureHeight = 1;
pictureWidth
- Type
- Number
- Description
- n/a
pictureWidth = 1;
S
shortcuts
- Type
- Array
- Description
- n/a
shortcuts[] = {"512 + 0x11"};
sideDisabled
- Type
- String
- Description
- n/a
sideDisabled = "a3\ui_f\data\gui\rsc\rscdisplaymultiplayersetup\flag_none_ca.paa";
sideToggle
- Type
- String
- Description
- n/a
sideToggle = "a3\ui_f\data\gui\rsc\rscdisplaymultiplayersetup\flag_opfor_ca.paa";
soundClick
- Type
- Array
- Description
- The sound to play, when the button is being released.
soundClick[] = {"",0.1,1};
soundDoubleClick
- Type
- Array
- Description
- The sound to play, when the cursor enters the button's bounds.
soundDoubleClick[] = {"",0.1,1};
soundEnter
- Type
- Array
- Description
- The sound to play, when the cursor enters the button's bounds.
soundEnter[] = {"",0.1,1};
soundEscape
- Type
- Array
- Description
- The sound to play, when the button has been pushed and the mouse button is released when not over the control.
soundEscape[] = {"",0.1,1};
soundPush
- Type
- Array
- Description
- The sound to play, when the button has been pushed.
soundPush[] = {"",0.1,1};
T
textHeight
- Type
- Number
- Description
- n/a
textHeight = 0.38;
textMuted
- Type
- String
- Description
- n/a
textMuted = "\A3\Ui_f\Data\IGUI\RscIngameUI\RscDisplayChannel\MuteVON_crossed_ca.paa";
U
url
- Type
- String
- Description
- Link to open when control is pressed.
url = "";
Default Classes
RscActiveText
class RscActiveText
{
deletable = 0;
fade = 0;
access = 0;
type = CT_ACTIVETEXT;
style = ST_CENTER;
color[] = {0,0,0,1};
colorActive[] = {0.3,0.4,0,1};
colorDisabled[] = {1,1,1,0.25};
soundEnter[] =
{
"",
0.1,
1
};
soundPush[] =
{
"",
0.1,
1
};
soundClick[] =
{
"",
0.1,
1
};
soundEscape[] =
{
"",
0.1,
1
};
text = "";
default = 0;
idc = -1;
x = 0;
y = 0;
h = 0.035;
w = 0.035;
font = "RobotoCondensed";
shadow = 2;
sizeEx = GUI_TEXT_SIZE_MEDIUM;
url = "";
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
};
RscActivePicture
class RscActivePicture : RscActiveText
{
style = ST_MULTI + ST_TITLE_BAR;
color[] = {1,1,1,0.5};
colorActive[] = {1,1,1,1};
};
RscActivePictureKeepAspect
class RscActivePictureKeepAspect : RscActivePicture
{
style = ST_MULTI + ST_TITLE_BAR + ST_KEEP_ASPECT_RATIO;
};