CT EXTENSION: Difference between revisions
(Created page with "Category: Control Types") |
mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{CT|intro | |||
|macro = CT_EXTENSION | |||
|value = 107 | |||
|description = | |||
{{Feature|warning|This is a experimental feature currently available for testing on Development-Branch. It is not yet decided whether this will become available in Stable branch. Please provide Feedback on the {{Link|https://discord.gg/arma|{{arma}} Discord}}'s #dev_rc_branch channel. }} | |||
Extension controls are controlled and rendered by [[Extensions]]. The constant ''type'' property for these controls usually is {{hl|CT_EXTENSION}}. | |||
All inputs to the control are forwarded to the Extension. And the Extension will render the UI into a prepared texture that will then be displayed. | |||
}} | |||
{{CT|abc start}} | |||
=== C === | |||
{{CT|attribute | |||
|name=colorBackground | |||
|type1=Array | |||
|value1={0,0,0,0} | |||
|description=Color of the background (The backing texture gets cleared to this color before the Extension's OnDraw). If the UI is not created (Extension not found, or doesn't offer the uiClass), this color fills the whole control. | |||
}} | |||
=== E === | |||
{{CT|attribute | |||
|name=extension | |||
|type1=String | |||
|value1="RVExtensionTest" | |||
|description=Name of the Extension that provides this UI Control. | |||
}} | |||
=== T === | |||
{{CT|attribute | |||
|name=tileH | |||
|type1=Number | |||
|value1=1 | |||
|type2=String | |||
|value2="4 / (32 * pixelH)" | |||
|description=Height of one tile. Used with ST_TILE_PICTURE to create a repeating wall of pictures, such as the fullscreen backgrounds in the [[:Category:Eden Editor|Eden Editor]]. Uses [[GUI Coordinates]]. | |||
}} | |||
{{CT|attribute | |||
|name=tileW | |||
|type1=Number | |||
|value1=1 | |||
|type2=String | |||
|value2="8 / (32 * pixelW)" | |||
|description=Width of one tile. Used with ST_TILE_PICTURE to create a repeating wall of pictures, such as the fullscreen backgrounds in the [[:Category:Eden Editor|Eden Editor]]. Uses [[GUI Coordinates]]. | |||
}} | |||
=== U === | |||
{{CT|attribute | |||
|name=uiClass | |||
|type1=String | |||
|value1="TestUI_123" | |||
|description="Classname" of the UI, gets passed to the Extension, the Extension has to interpret it and choose what UI to display (If the Extension offers multiple UI Elements). | |||
}} | |||
{{CT|abc end}} | |||
{{CT|examples}} | |||
=== RscExtension === | |||
Baseline RscExtension example | |||
<syntaxhighlight lang="cpp"> | |||
class RscExtension | |||
{ | |||
type = CT_EXTENSION; // 107 | |||
idc = -1; | |||
deletable = 0; | |||
style = 0; | |||
colorBackground[] = {0,0,0,0}; | |||
x = 0; | |||
y = 0; | |||
w = 0.3; | |||
h = 0.3; | |||
extension = "ExtensionNameHere"; | |||
uiClass = "ClassNameHere"; | |||
}; | |||
</syntaxhighlight> | |||
=== RscWebBrowser === | |||
Web Browser sample, utilizing https://github.com/arma3/RVExtensionImGui/blob/main/dllmain.cpp#L76 | |||
<syntaxhighlight lang="cpp"> | |||
class RscExtension | |||
{ | |||
type = CT_EXTENSION; // 107 | |||
idc = -1; | |||
deletable = 0; | |||
style = 0; | |||
colorBackground[] = {0,0,0,0}; | |||
x = 0; | |||
y = 0; | |||
w = 0.3; | |||
h = 0.3; | |||
extension = "RVExtensionTest"; | |||
uiClass = "webbrowser_https://arma3.com/"; | |||
}; | |||
</syntaxhighlight> | |||
[[Category: Control Types]] | [[Category: Control Types]] |
Latest revision as of 13:57, 21 August 2024
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
Extension controls are controlled and rendered by Extensions. The constant type property for these controls usually is CT_EXTENSION. All inputs to the control are forwarded to the Extension. And the Extension will render the UI into a prepared texture that will then be displayed.
Related commands & functions
Related User Interface Eventhandlers
Alphabetical Order
#define CT_EXTENSION 107
C
colorBackground
- Type
- Array
- Description
- Color of the background (The backing texture gets cleared to this color before the Extension's OnDraw). If the UI is not created (Extension not found, or doesn't offer the uiClass), this color fills the whole control.
colorBackground[] = {0,0,0,0};
E
extension
- Type
- String
- Description
- Name of the Extension that provides this UI Control.
extension = "RVExtensionTest";
T
tileH
- Type
- Number, String
- Description
- Height of one tile. Used with ST_TILE_PICTURE to create a repeating wall of pictures, such as the fullscreen backgrounds in the Eden Editor. Uses GUI Coordinates.
Number example:
tileH = 1;
String example:
tileH = "4 / (32 * pixelH)";
tileW
- Type
- Number, String
- Description
- Width of one tile. Used with ST_TILE_PICTURE to create a repeating wall of pictures, such as the fullscreen backgrounds in the Eden Editor. Uses GUI Coordinates.
Number example:
tileW = 1;
String example:
tileW = "8 / (32 * pixelW)";
U
uiClass
- Type
- String
- Description
- "Classname" of the UI, gets passed to the Extension, the Extension has to interpret it and choose what UI to display (If the Extension offers multiple UI Elements).
uiClass = "TestUI_123";
Default Classes
RscExtension
Baseline RscExtension example
class RscExtension
{
type = CT_EXTENSION; // 107
idc = -1;
deletable = 0;
style = 0;
colorBackground[] = {0,0,0,0};
x = 0;
y = 0;
w = 0.3;
h = 0.3;
extension = "ExtensionNameHere";
uiClass = "ClassNameHere";
};
RscWebBrowser
Web Browser sample, utilizing https://github.com/arma3/RVExtensionImGui/blob/main/dllmain.cpp#L76
class RscExtension
{
type = CT_EXTENSION; // 107
idc = -1;
deletable = 0;
style = 0;
colorBackground[] = {0,0,0,0};
x = 0;
y = 0;
w = 0.3;
h = 0.3;
extension = "RVExtensionTest";
uiClass = "webbrowser_https://arma3.com/";
};