CT OBJECT: 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 | |||
|value = 80 | |||
|description = With this control type it is possible to integrate 3D objects into a dialog. For some more information you may want to look at this blog post by [[User:killzone_kid]]: http://killzonekid.com/arma-scripting-tutorials-gui-part-6/. | |||
{{Important|The y and z values for the [[vectorDir]] ([[#direction|direction]] array) and [[vectorUp]] ([[#up|up]]) are switched.}} | |||
|gallery=File:Arma3 player profile.jpg{{!}}The head in the shown dialog is an object, though it is unknown how to set the actual face texture or additional objects. | |||
|commands = | |||
* [[:Category:Command_Group:_GUI_Control_-_Object|Commands: Object]] | |||
|events = | |||
* [[User_Interface_Event_Handlers#onObjectMoved|onObjectMoved]] | |||
}} | |||
{{CT|abc start}} | |||
=== B === | |||
{{CT|attribute | |||
|name=boneHead | |||
|type1=String | |||
|value1="head" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=boneLEye | |||
|type1=String | |||
|value1="l_eye" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=boneLEyelidDown | |||
|type1=String | |||
|value1="eye_lwl" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=boneLEyelidUp | |||
|type1=String | |||
|value1="eye_upl" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=boneLPupil | |||
|type1=String | |||
|value1="l_pupila" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=boneREye | |||
|type1=String | |||
|value1="r_eye" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=boneREyelidDown | |||
|type1=String | |||
|value1="eye_lwr" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=boneREyelidUp | |||
|type1=String | |||
|value1="eye_upr" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=boneRPupil | |||
|type1=String | |||
|value1="r_pupila" | |||
|description= | |||
}} | |||
=== D === | |||
{{CT|attribute | |||
|name=direction | |||
|type1=Array | |||
|value1={1,0,0} | |||
|description=Equivalent of [[vectorDir]] with switched y and z values. | |||
}} | |||
=== E === | |||
{{CT|attribute | |||
|name=enableZoom | |||
|type1=Number | |||
|value1=1 | |||
|description=Toggle the ability to double click on the object to zoom in or out. | |||
}} | |||
=== F === | |||
{{CT|attribute | |||
|name=faceType | |||
|type1=String | |||
|value1="Man_A3" | |||
|description= | |||
}} | |||
=== I === | |||
{{CT|attribute | |||
|name=inBack | |||
|type1=Number | |||
|value1=0 | |||
|type2=String | |||
|value2="False" | |||
|description=Determines which set of coordinates to use. | |||
}} | |||
=== M === | |||
{{CT|attribute | |||
|name=model | |||
|type1=String | |||
|value1="\A3\ui_f\objects\face_preview" | |||
|description=Path to the to be used p3d file. | |||
}} | |||
{{CT|attribute | |||
|name=modelWoman | |||
|type1=String | |||
|value1="\A3\ui_f\objects\face_preview" | |||
|description= | |||
}} | |||
=== P === | |||
{{CT|attribute | |||
|name=position | |||
|type1=Array | |||
|value1={0,0,0.053} | |||
|description=Position of the object relative to [[Arma_3_GUI_Coordinates|[0,0]]] on the screen. | |||
}} | |||
=== S === | |||
{{CT|attribute | |||
|name=scale | |||
|type1=Number | |||
|value1=0.35 | |||
|description=Changes the size of the object. | |||
}} | |||
{{CT|attribute | |||
|name=selectionArrow | |||
|type1=String | |||
|value1="" | |||
|description=Compass object only. | |||
}} | |||
{{CT|attribute | |||
|name=selectionDate1 | |||
|type1=String | |||
|value1="" | |||
|description=Watch object only. | |||
}} | |||
{{CT|attribute | |||
|name=selectionDate2 | |||
|type1=String | |||
|value1="" | |||
|description=Watch object only. | |||
}} | |||
{{CT|attribute | |||
|name=selectionEyelid | |||
|type1=String | |||
|value1="eyelids" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionGlasses | |||
|type1=String | |||
|value1="eyelids" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionLBrow | |||
|type1=String | |||
|value1="lBrow" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionLip | |||
|type1=String | |||
|value1="LLip" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionLMouth | |||
|type1=String | |||
|value1="lMouth" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionMBrow | |||
|type1=String | |||
|value1="mBrow" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionMMouth | |||
|type1=String | |||
|value1="mMouth" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionPersonality | |||
|type1=String | |||
|value1="personality" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionRBrow | |||
|type1=String | |||
|value1="rBrow" | |||
|description= | |||
}} | |||
{{CT|attribute | |||
|name=selectionRMouth | |||
|type1=String | |||
|value1="rMouth" | |||
|description= | |||
}} | |||
=== U === | |||
{{CT|attribute | |||
|name=up | |||
|type1=Array | |||
|value1={0,1,0} | |||
|description=Equivalent to [[vectorUp]] command where y and z values are swapped. | |||
}} | |||
=== W === | |||
{{CT|attribute | |||
|name=waitForLoad | |||
|type1=Number | |||
|value1=0 | |||
|description= | |||
}} | |||
=== X === | |||
{{CT|attribute | |||
|name=xBack | |||
|type1=Number | |||
|value1=0.6 | |||
|description=x [[Arma_3_GUI_Coordinates|coordinate]] of the object with {{Inline code|inBack {{=}} 1}}. | |||
}} | |||
=== Y === | |||
{{CT|attribute | |||
|name=yBack | |||
|type1=Number | |||
|value1=0.5 | |||
|description=< [[Arma_3_GUI_Coordinates|coordinate]] of the object with {{Inline code|inBack {{=}} 1}}. | |||
}} | |||
=== Z === | |||
{{CT|attribute | |||
|name=z | |||
|type1=Number | |||
|value1=0.2 | |||
|description=z [[Arma_3_GUI_Coordinates|coordinate]] of the object with {{Inline code|inBack {{=}} 0}}. | |||
}} | |||
{{CT|attribute | |||
|name=zBack | |||
|type1=Number | |||
|value1=0.1 | |||
|description=z [[Arma_3_GUI_Coordinates|coordinate]] of the object with {{Inline code|inBack {{=}} 1}}. | |||
}} | |||
{{CT|attribute | |||
|name=zoomDuration | |||
|type1=Number | |||
|value1=1 | |||
|description=How long the zooming animation takes. | |||
}} | |||
{{CT|abc end}} | |||
{{CT|examples}} | |||
=== RscObject === | |||
<syntaxhighlight lang="cpp"> | |||
class RscObject | |||
{ | |||
access = 0; | |||
type = CT_OBJECT; | |||
scale = 1; | |||
direction[] = {0,0,1}; | |||
up[] = {0,1,0}; | |||
shadow = 0; | |||
}; | |||
</syntaxhighlight> | |||
== Other examples == | |||
<syntaxhighlight lang="cpp">class MyWatch | |||
{ | |||
idd = -1; | |||
class objects | |||
{ | |||
class Watch/*: RscObject*/ | |||
{ | |||
access = 0; | |||
shadow = 0; | |||
idc = 101; | |||
type = 80; | |||
model = "\core\watch\watch.p3d"; | |||
selectionDate1 = "date1"; | |||
selectionDate2 = "date2"; | |||
selectionDay = "day"; | |||
x = 0.7; | |||
xBack = 0.7; | |||
y = 0.12; | |||
yBack = 0.12; | |||
z = 0.22; | |||
zBack = 0.22; | |||
inBack = 0; | |||
enableZoom = 0; | |||
direction[] = { 0, 0, 1 }; | |||
up[] = { 0, 1, 0 }; | |||
zoomDuration = 1; | |||
scale = 0.7; | |||
waitForLoad = 0; | |||
class Animations | |||
{ | |||
class WatchHour | |||
{ | |||
type = "rotation"; | |||
source = "clockHour"; | |||
selection = "hodinova"; | |||
axis = "osa"; | |||
memory = 1; | |||
animPeriod = 0; | |||
angle0 = 0; | |||
angle1 = "rad 360"; | |||
}; | |||
class WatchMinute | |||
{ | |||
type = "rotation"; | |||
source = "clockMinute"; | |||
selection = "minutova"; | |||
axis = "osa"; | |||
memory = 1; | |||
animPeriod = 0; | |||
angle0 = 0; | |||
angle1 = "rad 360"; | |||
}; | |||
class WatchSecond | |||
{ | |||
type = "rotation"; | |||
source = "clockSecond"; | |||
selection = "vterinova"; | |||
axis = "osa"; | |||
memory = 1; | |||
animPeriod = 0; | |||
angle0 = 0; | |||
angle1 = "rad 360"; | |||
}; | |||
}; | |||
}; | |||
}; | |||
};</syntaxhighlight> | |||
[[Category: Dialogs]] |
Revision as of 13:41, 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
With this control type it is possible to integrate 3D objects into a dialog. For some more information you may want to look at this blog post by User:killzone_kid: http://killzonekid.com/arma-scripting-tutorials-gui-part-6/.
Related commands & functions
Related User Interface Eventhandlers
Alphabetical Order
#define CT_OBJECT 80
B
boneHead
- Type
- String
- Description
- n/a
boneHead = "head";
boneLEye
- Type
- String
- Description
- n/a
boneLEye = "l_eye";
boneLEyelidDown
- Type
- String
- Description
- n/a
boneLEyelidDown = "eye_lwl";
boneLEyelidUp
- Type
- String
- Description
- n/a
boneLEyelidUp = "eye_upl";
boneLPupil
- Type
- String
- Description
- n/a
boneLPupil = "l_pupila";
boneREye
- Type
- String
- Description
- n/a
boneREye = "r_eye";
boneREyelidDown
- Type
- String
- Description
- n/a
boneREyelidDown = "eye_lwr";
boneREyelidUp
- Type
- String
- Description
- n/a
boneREyelidUp = "eye_upr";
boneRPupil
- Type
- String
- Description
- n/a
boneRPupil = "r_pupila";
D
direction
direction[] = {1,0,0};
E
enableZoom
- Type
- Number
- Description
- Toggle the ability to double click on the object to zoom in or out.
enableZoom = 1;
F
faceType
- Type
- String
- Description
- n/a
faceType = "Man_A3";
I
inBack
Number example:
inBack = 0;
String example:
inBack = "False";
M
model
- Type
- String
- Description
- Path to the to be used p3d file.
model = "\A3\ui_f\objects\face_preview";
modelWoman
- Type
- String
- Description
- n/a
modelWoman = "\A3\ui_f\objects\face_preview";
P
position
position[] = {0,0,0.053};
S
scale
- Type
- Number
- Description
- Changes the size of the object.
scale = 0.35;
selectionArrow
- Type
- String
- Description
- Compass object only.
selectionArrow = "";
selectionDate1
- Type
- String
- Description
- Watch object only.
selectionDate1 = "";
selectionDate2
- Type
- String
- Description
- Watch object only.
selectionDate2 = "";
selectionEyelid
- Type
- String
- Description
- n/a
selectionEyelid = "eyelids";
selectionGlasses
- Type
- String
- Description
- n/a
selectionGlasses = "eyelids";
selectionLBrow
- Type
- String
- Description
- n/a
selectionLBrow = "lBrow";
selectionLip
- Type
- String
- Description
- n/a
selectionLip = "LLip";
selectionLMouth
- Type
- String
- Description
- n/a
selectionLMouth = "lMouth";
selectionMBrow
- Type
- String
- Description
- n/a
selectionMBrow = "mBrow";
selectionMMouth
- Type
- String
- Description
- n/a
selectionMMouth = "mMouth";
selectionPersonality
- Type
- String
- Description
- n/a
selectionPersonality = "personality";
selectionRBrow
- Type
- String
- Description
- n/a
selectionRBrow = "rBrow";
selectionRMouth
- Type
- String
- Description
- n/a
selectionRMouth = "rMouth";
U
up
up[] = {0,1,0};
W
waitForLoad
- Type
- Number
- Description
- n/a
waitForLoad = 0;
X
xBack
- Type
- Number
- Description
- x coordinate of the object with
inBack = 1
.
xBack = 0.6;
Y
yBack
- Type
- Number
- Description
- < coordinate of the object with
inBack = 1
.
yBack = 0.5;
Z
z
- Type
- Number
- Description
- z coordinate of the object with
inBack = 0
.
z = 0.2;
zBack
- Type
- Number
- Description
- z coordinate of the object with
inBack = 1
.
zBack = 0.1;
zoomDuration
- Type
- Number
- Description
- How long the zooming animation takes.
zoomDuration = 1;
Default Classes
RscObject
class RscObject
{
access = 0;
type = CT_OBJECT;
scale = 1;
direction[] = {0,0,1};
up[] = {0,1,0};
shadow = 0;
};
Other examples
class MyWatch
{
idd = -1;
class objects
{
class Watch/*: RscObject*/
{
access = 0;
shadow = 0;
idc = 101;
type = 80;
model = "\core\watch\watch.p3d";
selectionDate1 = "date1";
selectionDate2 = "date2";
selectionDay = "day";
x = 0.7;
xBack = 0.7;
y = 0.12;
yBack = 0.12;
z = 0.22;
zBack = 0.22;
inBack = 0;
enableZoom = 0;
direction[] = { 0, 0, 1 };
up[] = { 0, 1, 0 };
zoomDuration = 1;
scale = 0.7;
waitForLoad = 0;
class Animations
{
class WatchHour
{
type = "rotation";
source = "clockHour";
selection = "hodinova";
axis = "osa";
memory = 1;
animPeriod = 0;
angle0 = 0;
angle1 = "rad 360";
};
class WatchMinute
{
type = "rotation";
source = "clockMinute";
selection = "minutova";
axis = "osa";
memory = 1;
animPeriod = 0;
angle0 = 0;
angle1 = "rad 360";
};
class WatchSecond
{
type = "rotation";
source = "clockSecond";
selection = "vterinova";
axis = "osa";
memory = 1;
animPeriod = 0;
angle0 = 0;
angle1 = "rad 360";
};
};
};
};
};