CT OBJECT ZOOM: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(page overhaul)
Tag: Removed redirect
m (Text replacement - "{{CT|intro" to "Category: Control Types {{CT|intro ")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category: Control Types]]
{{CT|intro
{{CT|intro
|macro = CT_OBJECT_CONTAINER
 
|value = 82
|macro = CT_OBJECT_ZOOM
|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.
|value = 81
{{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>.}}
|description = Very similar to [[CT_OBJECT]]. See that page for information on objects in dialogs.
|gallery=
|commands =
|commands =
* [[:Category:Command_Group:_GUI_Control_-_Object|Commands: Object]]
|events =
|events =
* [[User_Interface_Event_Handlers#onObjectMoved|onObjectMoved]]
}}
}}


Line 12: Line 15:
=== A ===
=== A ===
{{CT|attribute
{{CT|attribute
|name=Areas
|name=AnimationSources
|type1=Class
|type1=Class
|value1=class Areas
|value1=class AnimationSources
{
{
class Usertexture
class Threat_Level_Source
{
{
selection = "display";
source = "user";
class Controls
initPhase = 0.005;
{
animPeriod = 1;
};
};
};
};
};
Line 55: Line 57:
|name=model
|name=model
|type1=String
|type1=String
|value1="\core\notepad\notepad.p3d"
|value1="\a3\Missions_F_Oldman\Systems\UI\Objects\WatchDummy.p3d"
|description=
|description=
}}
}}
Line 61: Line 63:
=== P ===
=== P ===
{{CT|attribute
{{CT|attribute
|name=paper1
|name=position
|type1=String
|type1=Array
|value1="#(argb,8,8,3)color(1,1,1,1)"
|value1={0,0,0.15}
|description=
|description=
}}
}}


{{CT|attribute
{{CT|attribute
|name=paper2
|name=positionBack
|type1=String
|type1=Array
|value1="#(argb,8,8,3)color(1,1,1,1)"
|value1={0.0475,-0.0575,0.225}
|description=
|description=
}}
}}


=== S ===
{{CT|attribute
{{CT|attribute
|name=paper3
|name=scale
|type1=String
|type1=Number
|value1="#(argb,8,8,3)color(1,1,1,1)"
|value1=2
|description=
}}
 
{{CT|attribute
|name=paper4
|type1=String
|value1="#(argb,8,8,3)color(1,1,1,1)"
|description=
|description=
}}
}}


{{CT|attribute
{{CT|attribute
|name=paper5
|name=selectionDate1
|type1=String
|type1=String
|value1="#(argb,8,8,3)color(1,1,1,1)"
|value1="date1"
|description=
|description=
}}
}}


{{CT|attribute
{{CT|attribute
|name=paper6
|name=selectionDate2
|type1=String
|type1=String
|value1="#(argb,8,8,3)color(1,1,1,1)"
|value1="date2"
|description=
|description=
}}
}}


{{CT|attribute
{{CT|attribute
|name=paper7
|name=selectionDay
|type1=String
|type1=String
|value1="#(argb,8,8,3)color(1,1,1,1)"
|value1="day"
|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=
|description=
}}
}}
Line 150: Line 117:
|name=xBack
|name=xBack
|type1=String
|type1=String
|value1="25 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"
|value1="26 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"
|description=
|description=
}}
}}
Line 158: Line 125:
|name=yBack
|name=yBack
|type1=String
|type1=String
|value1="12 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"
|value1="13 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"
|description=
|description=
}}
}}
Line 191: Line 158:


== Other Examples ==
== Other Examples ==
=== RscExample ===
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
class MyDrink
class MyCompass
{
{
idd = -1;
idd = -1;
movingEnable = 0;
class objects
enableSimulation = 1;
class Objects
{
{
class RscCompass /*: RscObject */
class Can
{
{
idc = -1;
onObjectMoved = "systemChat str _this";
type = 81;
idc = -1;  
type = 82;
model = "\A3\Structures_F\Items\Food\Can_V3_F.p3d";
scale = 1;
scale = 1;
shadow = 0;
direction[] = {0, -0.35, -0.65};
model = "\core\compass\compass.p3d";
up[] = {0, 0.65, -0.35};  
selectionArrow = "arrow";
position[] = { 0.026, 0.047, 0.2 };
//position[] = {0,0,0.2}; optional
direction[] = { 0, 1, 1 };
up[] = { 0, 0, -1 };
x = 0.5;
positionBack[] = { 0.0749, -0.059, 0.315 };
y = 0.5;
z = 0.2;
//positionBack[] = {0,0,1.2}; optional
xBack = 0.5;
yBack = 0.5;
zBack = 1.2;
inBack = 1;
inBack = 1;
enableZoom = 1;
enableZoom = 0;
zoomDuration = 0.001;
zoomDuration = 0.5;
class Areas
class Animations
{
{
class Something1
class Pointer
{
{
selection = "Area_1";
type = "rotation";
// 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
source = "compassPointer";
 
selection = "kompas";
// Only controls are supported (no object in object)
axis = "osa kompasu";
class Controls
memory = 1;
{
animPeriod = 0;
};
minValue = "rad -180";
maxValue = "rad 180";
angle0 = "rad -180";
angle1 = "rad 180";
};
class Arrow
{
type = "rotation";
source = "compassArrow";
selection = "arrow";
axis = "osa kompasu";
memory = 1;
animPeriod = 0;
minValue = "rad -180";
maxValue = "rad 180";
angle0 = "rad -180";
angle1 = "rad 180";
};
};
// Multiple areas are supported
class Cover
class Something2
{
{
selection = "Area_2";
type = "rotation";
// 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
source = "compassCover";
class Controls
selection = "vicko";
{
axis = "osa vicka";
};
memory = 1;
animPeriod = 0;
angle0 = 0;
angle1 = "rad -81";
};
};
};
};

Latest revision as of 15:25, 29 November 2020


Introduction

Very similar to CT_OBJECT. See that page for information on objects in dialogs.


Related commands & functions

Related User Interface Eventhandlers

Alphabetical Order

TokenNames common to most controls, such as x, y, w, h, text, idc... can be found here.
Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with this config crawler.
#define CT_OBJECT_ZOOM 81


A

AnimationSources

Type
Class
Description
n/a
class AnimationSources
{
	class Threat_Level_Source
	{
		source = "user";
		initPhase = 0.005;
		animPeriod = 1;
	};
};


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 = "\a3\Missions_F_Oldman\Systems\UI\Objects\WatchDummy.p3d";


P

position

Type
Array
Description
n/a
position[] = {0,0,0.15};


positionBack

Type
Array
Description
n/a
positionBack[] = {0.0475,-0.0575,0.225};


S

scale

Type
Number
Description
n/a
scale = 2;


selectionDate1

Type
String
Description
n/a
selectionDate1 = "date1";


selectionDate2

Type
String
Description
n/a
selectionDate2 = "date2";


selectionDay

Type
String
Description
n/a
selectionDay = "day";


U

up

Type
Array
Description
n/a
up[] = {0,1,0};


X

xBack

Type
String
Description
n/a
xBack = "26 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";


Y

yBack

Type
String
Description
n/a
yBack = "13 * ((((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

Arma 3
AddOns: Classes need to be initialised first with class SomeClass;

Missions: Since Arma 3 v2.02 one can use import SomeClass; to initialise a class (see the import keyword).

In older versions, use "Default" call BIS_fnc_exportGUIBaseClasses; and paste the result into the description.ext.


None

Other Examples

RscExample

class MyCompass
{
	idd = -1;
	class objects
	{
		class RscCompass /*: RscObject */
		{
			idc = -1;
			type = 81;
			scale = 1;
			shadow = 0;
			model = "\core\compass\compass.p3d";
			selectionArrow = "arrow";
			position[] = { 0.026, 0.047, 0.2 };
			direction[] = { 0, 1, 1 };
			up[] = { 0, 0, -1 };
			positionBack[] = { 0.0749, -0.059, 0.315 };
			inBack = 1;
			enableZoom = 0;
			zoomDuration = 0.5;
			class Animations
			{
				class Pointer
				{
					type = "rotation";
					source = "compassPointer";
					selection = "kompas";
					axis = "osa kompasu";
					memory = 1;
					animPeriod = 0;
					minValue = "rad -180";
					maxValue = "rad 180";
					angle0 = "rad -180";
					angle1 = "rad 180";
				};
				class Arrow
				{
					type = "rotation";
					source = "compassArrow";
					selection = "arrow";
					axis = "osa kompasu";
					memory = 1;
					animPeriod = 0;
					minValue = "rad -180";
					maxValue = "rad 180";
					angle0 = "rad -180";
					angle1 = "rad 180";
				};
				class Cover
				{
					type = "rotation";
					source = "compassCover";
					selection = "vicko";
					axis = "osa vicka";
					memory = 1;
					animPeriod = 0;
					angle0 = 0;
					angle1 = "rad -81";
				};
			};
		};
	};
};