CT OBJECT CONTAINER: Difference between revisions
Killzone Kid (talk | contribs) (Redirected page to DialogControls-Objects) |
(page overhaul) Tag: Removed redirect |
||
Line 1: | Line 1: | ||
# | {{CT|intro | ||
|macro = CT_OBJECT_CONTAINER | |||
|value = 82 | |||
|description = See [[CT_OBJECT]] for more information on the basics of object dialogs. In addition to [[CT_OBJECT]] this control type supports the addition of controls inside of a predefined area of the object which means that if the object moves so do the controls inside of it. | |||
{{Informative | For an object with selections one can use user texture. For example <tt>"\A3\Misc_F\Helpers\UserTexture1m.p3d"</tt> has selections: <tt>usertexture</tt>, <tt>usertexture TL</tt>,<tt>usertexture TR</tt>, <tt>usertexture BL</tt>.}} | |||
|gallery= | |||
|commands = | |||
|events = | |||
}} | |||
{{CT|abc start}} | |||
=== A === | |||
{{CT|attribute | |||
|name=Areas | |||
|type1=Class | |||
|value1=class Areas | |||
{ | |||
class Usertexture | |||
{ | |||
selection = "display"; | |||
class Controls | |||
{ | |||
}; | |||
}; | |||
}; | |||
|description= | |||
}} | |||
=== D === | |||
{{CT|attribute | |||
|name=direction | |||
|type1=Array | |||
|value1={0,0,1} | |||
|description= | |||
}} | |||
=== E === | |||
{{CT|attribute | |||
|name=enableZoom | |||
|type1=Number | |||
|value1=1 | |||
|description= | |||
}} | |||
=== I === | |||
{{CT|attribute | |||
|name=inBack | |||
|type1=Number | |||
|value1=0 | |||
|description= | |||
}} | |||
=== M === | |||
{{CT|attribute | |||
|name=model | |||
|type1=String | |||
|value1="\core\notepad\notepad.p3d" | |||
|description= | |||
}} | |||
=== P === | |||
{{CT|attribute | |||
|name=paper1 | |||
|type1=String | |||
|value1="#(argb,8,8,3)color(1,1,1,1)" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=paper2 | |||
|type1=String | |||
|value1="#(argb,8,8,3)color(1,1,1,1)" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=paper3 | |||
|type1=String | |||
|value1="#(argb,8,8,3)color(1,1,1,1)" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=paper4 | |||
|type1=String | |||
|value1="#(argb,8,8,3)color(1,1,1,1)" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=paper5 | |||
|type1=String | |||
|value1="#(argb,8,8,3)color(1,1,1,1)" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=paper6 | |||
|type1=String | |||
|value1="#(argb,8,8,3)color(1,1,1,1)" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=paper7 | |||
|type1=String | |||
|value1="#(argb,8,8,3)color(1,1,1,1)" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=position | |||
|type1=Array | |||
|value1={-0.08,0,0.32} | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=positionBack | |||
|type1=Array | |||
|value1={-0.325,0.197,0.8} | |||
|description= | |||
}} | |||
=== S === | |||
{{CT|attribute | |||
|name=scale | |||
|type1=Number | |||
|value1=1.2 | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionPaper | |||
|type1=String | |||
|value1="paper" | |||
|description= | |||
}} | |||
=== U === | |||
{{CT|attribute | |||
|name=up | |||
|type1=Array | |||
|value1={0,1,0} | |||
|description= | |||
}} | |||
=== X === | |||
{{CT|attribute | |||
|name=xBack | |||
|type1=String | |||
|value1="25 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)" | |||
|description= | |||
}} | |||
=== Y === | |||
{{CT|attribute | |||
|name=yBack | |||
|type1=String | |||
|value1="12 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)" | |||
|description= | |||
}} | |||
=== Z === | |||
{{CT|attribute | |||
|name=z | |||
|type1=Number | |||
|value1=1 | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=zBack | |||
|type1=Number | |||
|value1=2 | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=zoomDuration | |||
|type1=Number | |||
|value1=0.5 | |||
|description= | |||
}} | |||
{{CT|abc end}} | |||
{{CT|examples}} | |||
None | |||
== Other Examples == | |||
<syntaxhighlight lang="cpp"> | |||
class MyDrink | |||
{ | |||
idd = -1; | |||
movingEnable = 0; | |||
enableSimulation = 1; | |||
class Objects | |||
{ | |||
class Can | |||
{ | |||
onObjectMoved = "systemChat str _this"; | |||
idc = -1; | |||
type = 82; | |||
model = "\A3\Structures_F\Items\Food\Can_V3_F.p3d"; | |||
scale = 1; | |||
direction[] = {0, -0.35, -0.65}; | |||
up[] = {0, 0.65, -0.35}; | |||
//position[] = {0,0,0.2}; optional | |||
x = 0.5; | |||
y = 0.5; | |||
z = 0.2; | |||
//positionBack[] = {0,0,1.2}; optional | |||
xBack = 0.5; | |||
yBack = 0.5; | |||
zBack = 1.2; | |||
inBack = 1; | |||
enableZoom = 1; | |||
zoomDuration = 0.001; | |||
class Areas | |||
{ | |||
class Something1 | |||
{ | |||
selection = "Area_1"; | |||
// game will expect "Area_1 TL", "Area_1 TR", "Area_1 BL" memory points (Top Left, Top Right, Bottom Left) to be present in memory LOD. Basing on that surface will be created for rendering your controls | |||
// Only controls are supported (no object in object) | |||
class Controls | |||
{ | |||
}; | |||
}; | |||
// Multiple areas are supported | |||
class Something2 | |||
{ | |||
selection = "Area_2"; | |||
// game will expect "Area_2 TL", "Area_2 TR", "Area_2 BL" memory points (Top Left, Top Right, Bottom Left) to be present in memory LOD. Basing on that surface will be created for rendering your controls | |||
class Controls | |||
{ | |||
}; | |||
}; | |||
}; | |||
}; | |||
}; | |||
}; | |||
</syntaxhighlight> |
Revision as of 14:42, 29 November 2020
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
See CT_OBJECT for more information on the basics of object dialogs. In addition to CT_OBJECT this control type supports the addition of controls inside of a predefined area of the object which means that if the object moves so do the controls inside of it.
Related commands & functions
Related User Interface Eventhandlers
Alphabetical Order
#define CT_OBJECT_CONTAINER 82
A
Areas
- Type
- Class
- Description
- n/a
class Areas
{
class Usertexture
{
selection = "display";
class Controls
{
};
};
};
D
direction
- Type
- Array
- Description
- n/a
direction[] = {0,0,1};
E
enableZoom
- Type
- Number
- Description
- n/a
enableZoom = 1;
I
inBack
- Type
- Number
- Description
- n/a
inBack = 0;
M
model
- Type
- String
- Description
- n/a
model = "\core\notepad\notepad.p3d";
P
paper1
- Type
- String
- Description
- n/a
paper1 = "#(argb,8,8,3)color(1,1,1,1)";
paper2
- Type
- String
- Description
- n/a
paper2 = "#(argb,8,8,3)color(1,1,1,1)";
paper3
- Type
- String
- Description
- n/a
paper3 = "#(argb,8,8,3)color(1,1,1,1)";
paper4
- Type
- String
- Description
- n/a
paper4 = "#(argb,8,8,3)color(1,1,1,1)";
paper5
- Type
- String
- Description
- n/a
paper5 = "#(argb,8,8,3)color(1,1,1,1)";
paper6
- Type
- String
- Description
- n/a
paper6 = "#(argb,8,8,3)color(1,1,1,1)";
paper7
- Type
- String
- Description
- n/a
paper7 = "#(argb,8,8,3)color(1,1,1,1)";
position
- Type
- Array
- Description
- n/a
position[] = {-0.08,0,0.32};
positionBack
- Type
- Array
- Description
- n/a
positionBack[] = {-0.325,0.197,0.8};
S
scale
- Type
- Number
- Description
- n/a
scale = 1.2;
selectionPaper
- Type
- String
- Description
- n/a
selectionPaper = "paper";
U
up
- Type
- Array
- Description
- n/a
up[] = {0,1,0};
X
xBack
- Type
- String
- Description
- n/a
xBack = "25 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
Y
yBack
- Type
- String
- Description
- n/a
yBack = "12 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
Z
z
- Type
- Number
- Description
- n/a
z = 1;
zBack
- Type
- Number
- Description
- n/a
zBack = 2;
zoomDuration
- Type
- Number
- Description
- n/a
zoomDuration = 0.5;
Default Classes
None
Other Examples
class MyDrink
{
idd = -1;
movingEnable = 0;
enableSimulation = 1;
class Objects
{
class Can
{
onObjectMoved = "systemChat str _this";
idc = -1;
type = 82;
model = "\A3\Structures_F\Items\Food\Can_V3_F.p3d";
scale = 1;
direction[] = {0, -0.35, -0.65};
up[] = {0, 0.65, -0.35};
//position[] = {0,0,0.2}; optional
x = 0.5;
y = 0.5;
z = 0.2;
//positionBack[] = {0,0,1.2}; optional
xBack = 0.5;
yBack = 0.5;
zBack = 1.2;
inBack = 1;
enableZoom = 1;
zoomDuration = 0.001;
class Areas
{
class Something1
{
selection = "Area_1";
// game will expect "Area_1 TL", "Area_1 TR", "Area_1 BL" memory points (Top Left, Top Right, Bottom Left) to be present in memory LOD. Basing on that surface will be created for rendering your controls
// Only controls are supported (no object in object)
class Controls
{
};
};
// Multiple areas are supported
class Something2
{
selection = "Area_2";
// game will expect "Area_2 TL", "Area_2 TR", "Area_2 BL" memory points (Top Left, Top Right, Bottom Left) to be present in memory LOD. Basing on that surface will be created for rendering your controls
class Controls
{
};
};
};
};
};
};