CT EXTENSION: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 59: | Line 59: | ||
{{CT|examples}} | {{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]] |
Revision as of 15:49, 20 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_EXTENSIONC.
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/";
};