CT_ACTIVETEXT

From Bohemia Interactive Community
Revision as of 19:24, 20 June 2021 by Lou Montana (talk | contribs) (Text replacement - "bis_fnc_" to "BIS_fnc_")
Jump to navigation Jump to search


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.
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

Dialog controls activetext.jpg


Related commands & functions

Related User Interface Eventhandlers

Alphabetical Order

TokenNames common to most controls, such as x, y, w, h, text, idc... can be found here.
Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with this config crawler.
#define CT_ACTIVETEXT 11


A

action

Type
String
Description
SQS code to execute when the control is clicked.
Use onButtonClick instead.
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

Arma 3
AddOns: Classes need to be initialised first with class SomeClass;

Missions: Since Arma 3 v2.02 one can use import SomeClass; to initialise a class (see the import keyword).

In older versions, use "Default" call BIS_fnc_exportGUIBaseClasses; and paste the result into the description.ext.

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