CT HTML: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Redirected page to DialogControls-Text)
 
(page overhaul)
Tag: Removed redirect
Line 1: Line 1:
#REDIRECT [[DialogControls-Text]]
{{CT|intro
|macro = CT_HTML
|value = 9
|description = The HTML control is well known as the "notebook" in the Map-View of the game. It can display a text over more pages and can inherit links to other, own defined sections. It has some simple formatting possibilities. It also can display images.
|commands =
* [[:Category:Command_Group:_GUI_Control_-_HTML|Commands: HTML]]
|events =
}}
 
{{CT|abc start}}
=== C ===
{{CT|attribute
|name=colorBold
|type1=Array
|value1={1,1,1,1}
|description=Color of '''bold''' text (between &lt;b&gt; and </b> tags).
}}
 
{{CT|attribute
|name=colorLink
|type1=Array
|value1={1,1,1,1}
|description=Text color of links (between <a href="#Sectionname> and </a>).
}}
 
{{CT|attribute
|name=colorLinkActive
|type1=Array
|value1={1,1,1,1}
|description=Text color of the active link (normaly the fist on in page).
}}
 
{{CT|attribute
|name=colorPicture
|type1=Array
|value1={1,1,1,1}
|description=Color of transparent part of image.
}}
 
{{CT|attribute
|name=colorPictureBorder
|type1=Array
|value1={0,0,0,0}
|description=Color of the borader arround image.
}}
 
{{CT|attribute
|name=colorPictureLink
|type1=Array
|value1={1,1,1,1}
|description=Color of transparent part of image within links
}}
 
{{CT|attribute
|name=colorPictureSelected
|type1=Array
|value1={1,1,1,1}
|description=Color of transparent part of image within active links.
}}
 
{{CT|attribute
|name=cycleAllLinks
|type1=Number
|value1=0
|description=
}}
 
{{CT|attribute
|name=cycleLinks
|type1=Number
|value1=0
|description=
}}
 
=== F ===
{{CT|attribute
|name=filename
|type1=String
|value1="a3\ui_f\data\html\RscFeedback.html"
|description=The html file to load into the control at startup
}}
 
=== H ===
{{CT|attribute
|name=H1
|type1=Class
|value1=class H1
{
font = "RobotoCondensed";
fontBold = "RobotoCondensedBold";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
};
|description=Header settings. Classes H1 to H6 as well as P are available.<br>
{{{!}}class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" {{!}}
! colspan="3" bgcolor="#bbbbff" {{!}} Properties of subclass (H1-H6,P)
{{!}}-
! bgcolor="#ddddff" {{!}} Name
! bgcolor="#ddddff" {{!}} Type
! bgcolor="#ddddff" {{!}} Remark
{{!}}-
{{!}} '''font'''
{{!}} string
{{!}} font to use for default text
{{!}}-
{{!}} '''fontBold'''
{{!}} string
{{!}} font to use within bold tags
{{!}}-
{{!}} '''sizeEx'''
{{!}} [[Float]]
{{!}} font size
{{!}}-
{{!}}}<br clear="all">
}}
 
=== N ===
{{CT|attribute
|name=nextPage
|type1=String
|value1="\A3\ui_f\data\gui\rsccommon\rschtml\arrow_right_ca.paa"
|description=Filename of image which is used as right arrow.
}}
 
=== P ===
{{CT|attribute
|name=P
|type1=Class
|value1=class P
{
font = "RobotoCondensed";
fontBold = "RobotoCondensedBold";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
align = "left";
};
|description=See [[#H1]].
}}
 
{{CT|attribute
|name=prevPage
|type1=String
|value1="\A3\ui_f\data\gui\rsccommon\rschtml\arrow_left_ca.paa"
|description=Filename of image which is used as left arrow.
}}
 
{{CT|abc end}}
 
{{CT|examples}}
=== RscExample ===
<syntaxhighlight lang="cpp">
class RscHTML
{
deletable = 0;
fade = 0;
access = 0;
type = CT_HTML;
idc = -1;
style = ST_LEFT;
filename = "";
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
colorBold[] = {1,1,1,1};
colorLink[] = {1,1,1,0.75};
colorLinkActive[] = {1,1,1,1};
colorPicture[] = {1,1,1,1};
colorPictureLink[] = {1,1,1,1};
colorPictureSelected[] = {1,1,1,1};
colorPictureBorder[] = {0,0,0,0};
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
class H1
{
font = "RobotoCondensed";
fontBold = "RobotoCondensedBold";
sizeEx = GUI_TEXT_SIZE_LARGE;
align = "left";
};
class H2
{
font = "RobotoCondensed";
fontBold = "RobotoCondensedBold";
sizeEx = GUI_TEXT_SIZE_MEDIUM;
align = "right";
};
class H3
{
font = "RobotoCondensed";
fontBold = "RobotoCondensedBold";
sizeEx = GUI_TEXT_SIZE_MEDIUM;
align = "left";
};
class H4
{
font = "RobotoCondensed";
fontBold = "RobotoCondensedBold";
sizeEx = GUI_TEXT_SIZE_MEDIUM;
align = "left";
};
class H5
{
font = "RobotoCondensed";
fontBold = "RobotoCondensedBold";
sizeEx = GUI_TEXT_SIZE_MEDIUM;
align = "left";
};
class H6
{
font = "RobotoCondensed";
fontBold = "RobotoCondensedBold";
sizeEx = GUI_TEXT_SIZE_MEDIUM;
align = "left";
};
class P
{
font = "RobotoCondensed";
fontBold = "RobotoCondensedBold";
sizeEx = GUI_TEXT_SIZE_MEDIUM;
align = "left";
};
x = 0;
y = 0;
w = 0.1;
h = 0.1;
sizeEx = GUI_TEXT_SIZE_MEDIUM;
prevPage = "\A3\ui_f\data\gui\rsccommon\rschtml\arrow_left_ca.paa";
nextPage = "\A3\ui_f\data\gui\rsccommon\rschtml\arrow_right_ca.paa";
shadow = 2;
};
</syntaxhighlight>
 
[[Category: Dialogs]]

Revision as of 11:55, 1 December 2020

Introduction

The HTML control is well known as the "notebook" in the Map-View of the game. It can display a text over more pages and can inherit links to other, own defined sections. It has some simple formatting possibilities. It also can display images.


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_HTML 9


C

colorBold

Type
Array
Description
Color of bold text (between <b> and tags).
colorBold[] = {1,1,1,1};


colorLink

Type
Array
Description
Text color of links (between <a href="#Sectionname> and </a>).
colorLink[] = {1,1,1,1};


colorLinkActive

Type
Array
Description
Text color of the active link (normaly the fist on in page).
colorLinkActive[] = {1,1,1,1};


colorPicture

Type
Array
Description
Color of transparent part of image.
colorPicture[] = {1,1,1,1};


colorPictureBorder

Type
Array
Description
Color of the borader arround image.
colorPictureBorder[] = {0,0,0,0};


colorPictureLink

Type
Array
Description
Color of transparent part of image within links
colorPictureLink[] = {1,1,1,1};


colorPictureSelected

Type
Array
Description
Color of transparent part of image within active links.
colorPictureSelected[] = {1,1,1,1};


cycleAllLinks

Type
Number
Description
n/a
cycleAllLinks = 0;


cycleLinks

Type
Number
Description
n/a
cycleLinks = 0;


F

filename

Type
String
Description
The html file to load into the control at startup
filename = "a3\ui_f\data\html\RscFeedback.html";


H

H1

Type
Class
Description
Header settings. Classes H1 to H6 as well as P are available.
Properties of subclass (H1-H6,P)
Name Type Remark
font string font to use for default text
fontBold string font to use within bold tags
sizeEx Float font size

class H1
{
	font = "RobotoCondensed";
	fontBold = "RobotoCondensedBold";
	sizeEx = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
};


N

nextPage

Type
String
Description
Filename of image which is used as right arrow.
nextPage = "\A3\ui_f\data\gui\rsccommon\rschtml\arrow_right_ca.paa";


P

P

Type
Class
Description
See #H1.
class P
{
	font = "RobotoCondensed";
	fontBold = "RobotoCondensedBold";
	sizeEx = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
	align = "left";
};


prevPage

Type
String
Description
Filename of image which is used as left arrow.
prevPage = "\A3\ui_f\data\gui\rsccommon\rschtml\arrow_left_ca.paa";



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.

RscExample

class RscHTML
{
	deletable = 0;
	fade = 0;
	access = 0;
	type = CT_HTML;
	idc = -1;
	style = ST_LEFT;
	filename = "";
	colorBackground[] = {0,0,0,0};
	colorText[] = {1,1,1,1};
	colorBold[] = {1,1,1,1};
	colorLink[] = {1,1,1,0.75};
	colorLinkActive[] = {1,1,1,1};
	colorPicture[] = {1,1,1,1};
	colorPictureLink[] = {1,1,1,1};
	colorPictureSelected[] = {1,1,1,1};
	colorPictureBorder[] = {0,0,0,0};
	tooltipColorText[] = {1,1,1,1};
	tooltipColorBox[] = {1,1,1,1};
	tooltipColorShade[] = {0,0,0,0.65};
	class H1
	{
		font = "RobotoCondensed";
		fontBold = "RobotoCondensedBold";
		sizeEx = GUI_TEXT_SIZE_LARGE;
		align = "left";
	};
	class H2
	{
		font = "RobotoCondensed";
		fontBold = "RobotoCondensedBold";
		sizeEx = GUI_TEXT_SIZE_MEDIUM;
		align = "right";
	};
	class H3
	{
		font = "RobotoCondensed";
		fontBold = "RobotoCondensedBold";
		sizeEx = GUI_TEXT_SIZE_MEDIUM;
		align = "left";
	};
	class H4
	{
		font = "RobotoCondensed";
		fontBold = "RobotoCondensedBold";
		sizeEx = GUI_TEXT_SIZE_MEDIUM;
		align = "left";
	};
	class H5
	{
		font = "RobotoCondensed";
		fontBold = "RobotoCondensedBold";
		sizeEx = GUI_TEXT_SIZE_MEDIUM;
		align = "left";
	};
	class H6
	{
		font = "RobotoCondensed";
		fontBold = "RobotoCondensedBold";
		sizeEx = GUI_TEXT_SIZE_MEDIUM;
		align = "left";
	};
	class P
	{
		font = "RobotoCondensed";
		fontBold = "RobotoCondensedBold";
		sizeEx = GUI_TEXT_SIZE_MEDIUM;
		align = "left";
	};
	x = 0;
	y = 0;
	w = 0.1;
	h = 0.1;
	sizeEx = GUI_TEXT_SIZE_MEDIUM;
	prevPage = "\A3\ui_f\data\gui\rsccommon\rschtml\arrow_left_ca.paa";
	nextPage = "\A3\ui_f\data\gui\rsccommon\rschtml\arrow_right_ca.paa";
	shadow = 2;
};