CT – Template
Jump to navigation
Jump to search
(named params for start) |
(added template for ct navbox, added source) |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#switch: {{lc:{{{1}}}}} | {{#switch: {{lc:{{{1}}}}} | ||
|start = = Introduction = | |start = {{Navbox control types}} | ||
= Introduction = | |||
{{{description}}} | {{{description}}} | ||
Line 31: | Line 33: | ||
=Usage= | =Usage= | ||
<pre> | |||
{{CT|start | |||
|macro = CT_MYNAME | |||
|value = 1234 | |||
|description = Informative text about this control type.}} | |||
{{CT|attribute | |||
| name=testAttribute | |||
| value="test" | |||
| type=String | |||
| description=This is a test attribute to test things. | |||
}} | |||
{{CT|attribute | |||
| name=testArray | |||
| value={1,0,0,1} | |||
| type=Array | |||
| description=This is a test array to test arrays. {{Important|Notice Me!}} | |||
}} | |||
{{CT|attribute | |||
| name=testClass | |||
| value=SubClass | |||
| type=Class | |||
| description=This is a test class to test classes. | |||
}} | |||
{{CT|stop}} | |||
{{CT|examples}} | |||
== RscExample == | |||
<syntaxhighlight lang="cpp"> | |||
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> | |||
</pre> | |||
{{CT|start | {{CT|start | ||
|macro = CT_MYNAME | |macro = CT_MYNAME | ||
Line 64: | Line 116: | ||
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> | ||
</noinclude> | </noinclude> | ||
[[Category:Templates|{{uc:{{PAGENAME}}}}]] | [[Category:Templates|{{uc:{{PAGENAME}}}}]] |
Revision as of 00:52, 6 November 2020
Usage
{{CT|start |macro = CT_MYNAME |value = 1234 |description = Informative text about this control type.}} {{CT|attribute | name=testAttribute | value="test" | type=String | description=This is a test attribute to test things. }} {{CT|attribute | name=testArray | value={1,0,0,1} | type=Array | description=This is a test array to test arrays. {{Important|Notice Me!}} }} {{CT|attribute | name=testClass | value=SubClass | type=Class | description=This is a test class to test classes. }} {{CT|stop}} {{CT|examples}} == RscExample == <syntaxhighlight lang="cpp"> 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>
Introduction
Informative text about this control type.
Alphabetical Order
#define CT_MYNAME 1234
Template:Cfg ref Template:Cfg ref
testAttribute
- Type
- String
- Description
- This is a test attribute to test things.
testAttribute = "test";
testArray
- Type
- Array
- Description
- This is a test array to test arrays.
testArray[] = {1,0,0,1};
testClass
- Type
- Class
- Description
- This is a test class to test classes.
class testClass {};
Default Classes
The following classes are part of the export that is generated with "Default" call BIS_fnc_exportGUIBaseClasses
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;
};