CT – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(allow empty description)
(implemented example for each type)
Line 28: Line 28:
;Type: [[TokenNameValueTypes|{{{type1}}}]]{{#if: {{{type2|}}} | , [[TokenNameValueTypes|{{{type2}}}]]}}{{#if: {{{type3|}}} | , [[TokenNameValueTypes|{{{type3}}}]]}}{{#if: {{{type4|}}} | , [[TokenNameValueTypes|{{{type4}}}]]}}
;Type: [[TokenNameValueTypes|{{{type1}}}]]{{#if: {{{type2|}}} | , [[TokenNameValueTypes|{{{type2}}}]]}}{{#if: {{{type3|}}} | , [[TokenNameValueTypes|{{{type3}}}]]}}{{#if: {{{type4|}}} | , [[TokenNameValueTypes|{{{type4}}}]]}}
;Description: {{#if: {{{description|}}}|{{{description}}}|n/a}}
;Description: {{#if: {{{description|}}}|{{{description}}}|n/a}}
{{#if: {{{type2|}}}|{{{type1}}} Example:}}
{{#tag:syntaxhighlight|{{#switch: {{{type1}}}
{{#tag:syntaxhighlight|{{#switch: {{{type1}}}
  | Array = {{{name}}}[] = {{{value}}};
  | Array = {{{name}}}[] = {{{value1}}};
  | Class = {{{value}}}
  | Class = {{{value1}}}
  | {{{name}}} {{=}} {{{value}}};
  | {{{name}}} {{=}} {{{value1}}};
}}|lang=cpp}}
}}|lang=cpp}}
{{#if: {{{type2|}}}|{{{type2}}} example:
{{#tag:syntaxhighlight|{{#switch: {{{type2}}}
| Array = {{{name}}}[] = {{{value2}}};
| Class = {{{value2}}}
| {{{name}}} {{=}} {{{value2}}};
}}|lang=cpp}}}}
{{#if: {{{type3|}}}|{{#tag:syntaxhighlight|----
{{#switch: {{{type3}}}
| Array = {{{name}}}[] = {{{value3}}};
| Class = {{{value3}}}
| {{{name}}} {{=}} {{{value3}}};
}}|lang=cpp}}}}
{{#if: {{{type4|}}}|{{#tag:syntaxhighlight|----
{{#switch: {{{type4}}}
| Array = {{{name}}}[] = {{{value4}}};
| Class = {{{value4}}}
| {{{name}}} {{=}} {{{value4}}};
}}|lang=cpp}}}}


|abc end = {{Cfg ref|end}}
|abc end = {{Cfg ref|end}}
Line 62: Line 81:
{{CT|attribute
{{CT|attribute
| name=testArray
| name=testArray
| value={1,0,0,1}
| value1={1,0,0,1}
| type1=Array
| type1=Array
| description=This is a test array to test arrays. {{Important|Notice Me!}}
| description=This is a test array to test arrays. {{Important|Notice Me!}}
Line 68: Line 87:
{{CT|attribute
{{CT|attribute
| name=testAttribute
| name=testAttribute
| value="test"
| value1="test"
| type1=String
| type1=String
| mandatory=1
| mandatory=1
Line 75: Line 94:
{{CT|attribute
{{CT|attribute
| name=testClass
| name=testClass
|value=class ComboScrollBar
| type1=Class
| value1=class ComboScrollBar
{
{
color[] = {1,1,1,1};
color[] = {1,1,1,1};
Line 93: Line 113:
autoScrollRewind = 0;
autoScrollRewind = 0;
};
};
| type1=Class
| type2=Number
| type2=Number
| value2=9876
| description=This is a test class to test classes.
| description=This is a test class to test classes.
}}
}}

Revision as of 21:04, 7 November 2020

Template:wip

Usage



Template:Navbox control types Template:Cfg ref

Introduction

Informative text about this control type.

Related commands

Related User Interface Eventhandlers

Alphabetical Order

TokenNames common to most controls, such as x, y, w, h, text, idc... can be found here.
#define CT_TREE 1234


Template:Cfg ref

T

testArray

Type
Array
Description
This is a test array to test arrays.
Notice Me!
testArray[] = {1,0,0,1};


testAttribute

This attribute is mandatory for the control to work!
Type
String
Description
n/a
testAttribute = "test";


testClass

Type
Class, Number
Description
This is a test class to test classes.

Class Example:

class ComboScrollBar
{
	color[] = {1,1,1,1};
	colorActive[] = {1,1,1,1};
	colorDisabled[] = {1,1,1,0.3};
	thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
	arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
	arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
	border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
	shadow = 0;
	scrollSpeed = 0.06;
	width = 0;
	height = 0;
	autoScrollEnabled = 0;
	autoScrollSpeed = -1;
	autoScrollDelay = 5;
	autoScrollRewind = 0;
};

Number example:

testClass = 9876;


Template:Cfg ref


Default Classes

The following classes are part of the export that is generated with "Default" call BIS_fnc_exportGUIBaseClasses In order for the classes below to work you need to have them exported with the function above.
Arma 3
Starting with Arma 3 v2.01.146644 you can use the import directive instead.

RscExample

class RscExample
{
    deletable = 0;
    fade = 0;
    access = 0;
    type = CT_TYPEMACRO;
    style = SL_HORZ;
    color[] = {1,1,1,0.8};
    colorActive[] = {1,1,1,1};
    shadow = 0;
    x = 0;
    y = 0;
    w = 0.3;
    h = 0.025;
};