CT EXTENSION: Difference between revisions
mNo edit summary |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
|macro = CT_EXTENSION | |macro = CT_EXTENSION | ||
|value = 107 | |value = 107 | ||
|description =Extension controls are controlled and rendered by [[Extensions]]. The constant ''type'' property for these controls usually is {{hl| | |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. | |||
}} | }} | ||
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/";
};