CT – Template
m (testing different gallery modes) |
Lou Montana (talk | contribs) m (Text replacement - "{{Feature|Informative|" to "{{Feature|informative|") |
||
(27 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#switch: {{lc:{{{1}}}}} | {{#switch: {{lc:{{{1}}}}} | ||
|intro | |||
{{ | |intro = {{#ifeq:{{uc:{{FULLPAGENAME}}}}|TEMPLATE:CT||{{DISPLAYTITLE:{{{macro}}}}}}}{{Navbox/CT}} | ||
{{ConfigPage|start}} | |||
== Introduction == | == Introduction == | ||
{{{description}}} | {{{description}}} | ||
{{#if: {{{gallery|}}}| | {{#if: {{{gallery|}}}| | ||
{{#tag:gallery|{{{gallery}}}|mode=" | {{#tag:gallery|{{{gallery}}}|mode="slideshow"|heights=240px|widths=240px}} | ||
}} | }} | ||
Line 17: | Line 18: | ||
=== Related User Interface Eventhandlers === | === Related User Interface Eventhandlers === | ||
* [[User_Interface_Event_Handlers# | * [[User_Interface_Event_Handlers#Generic_Events|Events: General]]<!-- | ||
-->{{#if: {{{events|}}} | | -->{{#if: {{{events|}}} | | ||
{{{events}}} | {{{events}}} | ||
Line 23: | Line 24: | ||
== Alphabetical Order == | == Alphabetical Order == | ||
{{ | {{Feature|informative|TokenNames common to most controls, such as x, y, w, h, text, idc... can be found [[Arma:_GUI_Configuration#Common_Properties|'''here''']].}} | ||
{{ | {{Feature|warning|Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with [https://github.com/7erra/BIKI.VR/blob/master/fnc/generateCTPage.sqf this] config crawler.}} | ||
{{#tag:syntaxhighlight|#define {{{macro}}} {{{value}}}|lang=cpp}} | {{#tag:syntaxhighlight|#define {{{macro}}} {{{value}}}|lang="cpp"}} | ||
|abc start = {{ConfigPage|abc}} | |||
|attribute = ==== {{{name}}} ==== | |attribute = ==== {{{name}}} ==== | ||
{{#if: {{{mandatory|}}} |{{ | {{#if: {{{mandatory|}}} |{{Feature|important|This attribute is mandatory for the control to work!}}}} | ||
;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:}} | {{#if: {{{type2|}}}|{{{type1}}} example:}} | ||
{{#tag:syntaxhighlight|{{#switch: {{{type1}}} | {{#tag:syntaxhighlight|{{#switch: {{{type1}}} | ||
Line 37: | Line 39: | ||
| Class = {{{value1}}} | | Class = {{{value1}}} | ||
| {{{name}}} {{=}} {{{value1}}}; | | {{{name}}} {{=}} {{{value1}}}; | ||
}}|lang=cpp}} | }}|lang="cpp"}} | ||
{{#if: {{{type2|}}}|{{{type2}}} example: | {{#if: {{{type2|}}}|{{{type2}}} example: | ||
{{#tag:syntaxhighlight|{{#switch: {{{type2}}} | {{#tag:syntaxhighlight|{{#switch: {{{type2}}} | ||
Line 43: | Line 45: | ||
| Class = {{{value2}}} | | Class = {{{value2}}} | ||
| {{{name}}} {{=}} {{{value2}}}; | | {{{name}}} {{=}} {{{value2}}}; | ||
}}|lang=cpp}}}} | }}|lang="cpp"}}}} | ||
{{#if: {{{type3|}}}|{{{type3}}} example: | {{#if: {{{type3|}}}|{{{type3}}} example: | ||
{{#tag:syntaxhighlight|---- | {{#tag:syntaxhighlight|---- | ||
Line 50: | Line 52: | ||
| Class = {{{value3}}} | | Class = {{{value3}}} | ||
| {{{name}}} {{=}} {{{value3}}}; | | {{{name}}} {{=}} {{{value3}}}; | ||
}}|lang=cpp}}}} | }}|lang="cpp"}}}} | ||
{{#if: {{{type4|}}}|{{{type4}}} example: | {{#if: {{{type4|}}}|{{{type4}}} example: | ||
{{#tag:syntaxhighlight|---- | {{#tag:syntaxhighlight|---- | ||
Line 57: | Line 59: | ||
| Class = {{{value4}}} | | Class = {{{value4}}} | ||
| {{{name}}} {{=}} {{{value4}}}; | | {{{name}}} {{=}} {{{value4}}}; | ||
}}|lang=cpp}}}} | }}|lang="cpp"}}}} | ||
|abc end = {{ | |abc end = {{ConfigPage|end}} | ||
|examples = == Default Classes == | |examples = == Default Classes == | ||
{{ | {{Feature|arma3|'''AddOns:''' Classes need to be initialised first with <syntaxhighlight lang="cpp" inline>class SomeClass;</syntaxhighlight> | ||
---- | |||
'''Missions:''' Since {{arma3}} v2.02 one can use <syntaxhighlight lang="cpp" inline>import SomeClass;</syntaxhighlight> to initialise a class (see the [[import (Config)|import]] keyword). | |||
}} | In older versions, use <sqf inline>"Default" call BIS_fnc_exportGUIBaseClasses;</sqf> and paste the result into the [[Description.ext|description.ext]].}}}} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
== Usage == | == Usage == | ||
<pre>{{CT|mode|arg1=value|arg2=value2|...}}</pre> | <pre>{{CT|mode|arg1=value|arg2=value2|...}}</pre> | ||
Line 74: | Line 74: | ||
! Mode !! Arguments !! Description !! Example | ! Mode !! Arguments !! Description !! Example | ||
|- | |- | ||
|rowspan="6"| '''intro''' || macro || Control type macro from [[BIS_fnc_exportGUIBaseClasses]]. || <pre>CT_STATIC</pre> | | rowspan="6" | '''intro''' || macro || Control type macro from [[BIS_fnc_exportGUIBaseClasses]]. || <pre>CT_STATIC</pre> | ||
|- | |- | ||
| value || Value of the macro. || <pre>0</pre> | | value || Value of the macro. || <pre>0</pre> | ||
Line 86: | Line 86: | ||
| events || List of UIEH that work on the control. || <pre>* [[User_Interface_Event_Handlers|Events: All]]</pre> | | events || List of UIEH that work on the control. || <pre>* [[User_Interface_Event_Handlers|Events: All]]</pre> | ||
|- | |- | ||
| colspan=4 | | | colspan="4" | | ||
|- | |- | ||
| '''abc start''' || no arguments || Marks the beggining of the config reference part with the use of the '''attribute''' mode. || | | '''abc start''' || no arguments || Marks the beggining of the config reference part with the use of the '''attribute''' mode. || | ||
|- | |- | ||
| colspan=4 | | | colspan="4" | | ||
|- | |- | ||
|rowspan="5"| '''attribute''' || name || Name of the attribute. || <pre>text</pre> | | rowspan="5" | '''attribute''' || name || Name of the attribute. || <pre>text</pre> | ||
|- | |- | ||
| value1-4 || Possible values of the config entry. Has to match the type given by type1-4. || <pre>"This is a string"</pre> | | value1-4 || Possible values of the config entry. Has to match the type given by type1-4. || <pre>"This is a string"</pre> | ||
Line 102: | Line 102: | ||
| mandatory || If defined a yellow warning box will be displayed at the attributes position. Mandatory attributes throw an error in RPT when omitted. || <pre>1</pre> | | mandatory || If defined a yellow warning box will be displayed at the attributes position. Mandatory attributes throw an error in RPT when omitted. || <pre>1</pre> | ||
|- | |- | ||
| colspan=4 | | | colspan="4" | | ||
|- | |- | ||
| '''abc end''' || no arguments || Marks the end of the config reference. || | | '''abc end''' || no arguments || Marks the end of the config reference. || | ||
|- | |- | ||
| colspan=4 | | | colspan="4" | | ||
|- | |- | ||
| '''examples''' || no arguments || Inserts the header and a disclaimer at this position. || | | '''examples''' || no arguments || Inserts the header and a disclaimer at this position. || | ||
Line 132: | Line 132: | ||
| value1={1,0,0,1} | | value1={1,0,0,1} | ||
| type1=Array | | type1=Array | ||
| description=This is a test array to test arrays. {{ | | description=This is a test array to test arrays. {{Feature|important|Notice Me!}} | ||
}} | }} | ||
{{CT|attribute | {{CT|attribute | ||
Line 173: | Line 173: | ||
class 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; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 00:26, 2 February 2024
Usage
{{CT|mode|arg1=value|arg2=value2|...}}
Mode | Arguments | Description | Example |
---|---|---|---|
intro | macro | Control type macro from BIS_fnc_exportGUIBaseClasses. | CT_STATIC |
value | Value of the macro. | 0 | |
description | Some text to give info about the CT. | This is CT_MAP. It is a map. | |
gallery | List of images to display in a gallery below the description. | File:Image.jpg{{!}}This is an image of the control. | |
commands | List of commands associated with the control. | * [[:Category:Command_Group:_GUI_Control_-_Controls_Table|Commands: Controls Table]] | |
events | List of UIEH that work on the control. | * [[User_Interface_Event_Handlers|Events: All]] | |
abc start | no arguments | Marks the beggining of the config reference part with the use of the attribute mode. | |
attribute | name | Name of the attribute. | text |
value1-4 | Possible values of the config entry. Has to match the type given by type1-4. | "This is a string" | |
type1-4 | Type of the respective value. Possible values: Number, String, Array, Class. Each type/value pair gets an example. | String | |
description | What does the attribute do? | This string displays text. | |
mandatory | If defined a yellow warning box will be displayed at the attributes position. Mandatory attributes throw an error in RPT when omitted. | 1 | |
abc end | no arguments | Marks the end of the config reference. | |
examples | no arguments | Inserts the header and a disclaimer at this position. |
You can inspect the generator code for this page by clicking EDIT on the top right. The code starts below this line:
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
Informative text about this control type.
Related commands & functions
- Commands: General
- Commands: UI Eventhandlers
- command group CT
Related User Interface Eventhandlers
- Events: General
- event1
- event2
Alphabetical Order
#define CT_TREE 1234
T
testArray
- Type
- Array
- Description
- This is a test array to test arrays.
testArray[] = {1,0,0,1};
testAttribute
- Type
- String
- Description
- n/a
testAttribute = "test";
testClass
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;
Default Classes
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;
};