{"name":"CT OBJECT ZOOM","title":"CT OBJECT ZOOM","type":"topic","url":"https://community.bistudio.com/wiki/CT_OBJECT_ZOOM","revid":170128,"updated":"2020-11-29T14:25:53Z","aliases":[],"markdown":"### Introduction\n\nVery similar to CT_OBJECT. See that page for information on objects in dialogs.\n\n#### Related commands & functions\n\n- Commands: General\n- Commands: UI Eventhandlers\n- Commands: Object\n\n#### Related User Interface Eventhandlers\n\n- Events: General\n- onObjectMoved\n\n### Alphabetical Order\n\n> [!NOTE]\n> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found **here**.\n\n> [!WARNING]\n> Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with [this](https://github.com/7erra/BIKI.VR/blob/master/fnc/generateCTPage.sqf) config crawler.\n\n```cpp\n#define CT_OBJECT_ZOOM 81\n```\n\n#### A\n\n##### AnimationSources\n\n**Type:** Class\n\n**Description:** n/a\n\n```cpp\nclass AnimationSources\n{\n    class Threat_Level_Source\n    {\n        source = \"user\";\n        initPhase = 0.005;\n        animPeriod = 1;\n    };\n};\n```\n\n#### D\n\n##### direction\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ndirection[] = {0,0,1};\n```\n\n#### E\n\n##### enableZoom\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nenableZoom = 1;\n```\n\n#### I\n\n##### inBack\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\ninBack = 0;\n```\n\n#### M\n\n##### model\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nmodel = \"\\a3\\Missions_F_Oldman\\Systems\\UI\\Objects\\WatchDummy.p3d\";\n```\n\n#### P\n\n##### position\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\nposition[] = {0,0,0.15};\n```\n\n##### positionBack\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\npositionBack[] = {0.0475,-0.0575,0.225};\n```\n\n#### S\n\n##### scale\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nscale = 2;\n```\n\n##### selectionDate1\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionDate1 = \"date1\";\n```\n\n##### selectionDate2\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionDate2 = \"date2\";\n```\n\n##### selectionDay\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionDay = \"day\";\n```\n\n#### U\n\n##### up\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\nup[] = {0,1,0};\n```\n\n#### X\n\n##### xBack\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nxBack = \"26 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)\";\n```\n\n#### Y\n\n##### yBack\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nyBack = \"13 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)\";\n```\n\n#### Z\n\n##### z\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nz = 1;\n```\n\n##### zBack\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nzBack = 2;\n```\n\n##### zoomDuration\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nzoomDuration = 0.5;\n```\n\n### Default Classes\n\n> [!NOTE]\n> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`\n>\n> ---\n>\n> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the import keyword).\n>\n> In older versions, use `\"Default\" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the description.ext.\n\nNone\n\n### Other Examples\n\n#### RscExample\n\n```cpp\nclass MyCompass\n{\n    idd = -1;\n    class objects\n    {\n        class RscCompass /*: RscObject */\n        {\n            idc = -1;\n            type = 81;\n            scale = 1;\n            shadow = 0;\n            model = \"\\core\\compass\\compass.p3d\";\n            selectionArrow = \"arrow\";\n            position[] = { 0.026, 0.047, 0.2 };\n            direction[] = { 0, 1, 1 };\n            up[] = { 0, 0, -1 };\n            positionBack[] = { 0.0749, -0.059, 0.315 };\n            inBack = 1;\n            enableZoom = 0;\n            zoomDuration = 0.5;\n            class Animations\n            {\n                class Pointer\n                {\n                    type = \"rotation\";\n                    source = \"compassPointer\";\n                    selection = \"kompas\";\n                    axis = \"osa kompasu\";\n                    memory = 1;\n                    animPeriod = 0;\n                    minValue = \"rad -180\";\n                    maxValue = \"rad 180\";\n                    angle0 = \"rad -180\";\n                    angle1 = \"rad 180\";\n                };\n                class Arrow\n                {\n                    type = \"rotation\";\n                    source = \"compassArrow\";\n                    selection = \"arrow\";\n                    axis = \"osa kompasu\";\n                    memory = 1;\n                    animPeriod = 0;\n                    minValue = \"rad -180\";\n                    maxValue = \"rad 180\";\n                    angle0 = \"rad -180\";\n                    angle1 = \"rad 180\";\n                };\n                class Cover\n                {\n                    type = \"rotation\";\n                    source = \"compassCover\";\n                    selection = \"vicko\";\n                    axis = \"osa vicka\";\n                    memory = 1;\n                    animPeriod = 0;\n                    angle0 = 0;\n                    angle1 = \"rad -81\";\n                };\n            };\n        };\n    };\n};\n```","sections":[{"heading":"Introduction","level":3,"markdown":"Very similar to CT_OBJECT. See that page for information on objects in dialogs."},{"heading":"Related commands & functions","level":4,"markdown":"- Commands: General\n- Commands: UI Eventhandlers\n- Commands: Object"},{"heading":"Related User Interface Eventhandlers","level":4,"markdown":"- Events: General\n- onObjectMoved"},{"heading":"Alphabetical Order","level":3,"markdown":"> [!NOTE]\n> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found **here**.\n\n> [!WARNING]\n> Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with [this](https://github.com/7erra/BIKI.VR/blob/master/fnc/generateCTPage.sqf) config crawler.\n\n```cpp\n#define CT_OBJECT_ZOOM 81\n```"},{"heading":"A","level":4,"markdown":""},{"heading":"AnimationSources","level":5,"markdown":"**Type:** Class\n\n**Description:** n/a\n\n```cpp\nclass AnimationSources\n{\n    class Threat_Level_Source\n    {\n        source = \"user\";\n        initPhase = 0.005;\n        animPeriod = 1;\n    };\n};\n```"},{"heading":"D","level":4,"markdown":""},{"heading":"direction","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ndirection[] = {0,0,1};\n```"},{"heading":"E","level":4,"markdown":""},{"heading":"enableZoom","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nenableZoom = 1;\n```"},{"heading":"I","level":4,"markdown":""},{"heading":"inBack","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\ninBack = 0;\n```"},{"heading":"M","level":4,"markdown":""},{"heading":"model","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nmodel = \"\\a3\\Missions_F_Oldman\\Systems\\UI\\Objects\\WatchDummy.p3d\";\n```"},{"heading":"P","level":4,"markdown":""},{"heading":"position","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\nposition[] = {0,0,0.15};\n```"},{"heading":"positionBack","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\npositionBack[] = {0.0475,-0.0575,0.225};\n```"},{"heading":"S","level":4,"markdown":""},{"heading":"scale","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nscale = 2;\n```"},{"heading":"selectionDate1","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionDate1 = \"date1\";\n```"},{"heading":"selectionDate2","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionDate2 = \"date2\";\n```"},{"heading":"selectionDay","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionDay = \"day\";\n```"},{"heading":"U","level":4,"markdown":""},{"heading":"up","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\nup[] = {0,1,0};\n```"},{"heading":"X","level":4,"markdown":""},{"heading":"xBack","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nxBack = \"26 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)\";\n```"},{"heading":"Y","level":4,"markdown":""},{"heading":"yBack","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nyBack = \"13 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)\";\n```"},{"heading":"Z","level":4,"markdown":""},{"heading":"z","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nz = 1;\n```"},{"heading":"zBack","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nzBack = 2;\n```"},{"heading":"zoomDuration","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nzoomDuration = 0.5;\n```"},{"heading":"Default Classes","level":3,"markdown":"> [!NOTE]\n> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`\n>\n> ---\n>\n> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the import keyword).\n>\n> In older versions, use `\"Default\" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the description.ext.\n\nNone"},{"heading":"Other Examples","level":3,"markdown":""},{"heading":"RscExample","level":4,"markdown":"```cpp\nclass MyCompass\n{\n    idd = -1;\n    class objects\n    {\n        class RscCompass /*: RscObject */\n        {\n            idc = -1;\n            type = 81;\n            scale = 1;\n            shadow = 0;\n            model = \"\\core\\compass\\compass.p3d\";\n            selectionArrow = \"arrow\";\n            position[] = { 0.026, 0.047, 0.2 };\n            direction[] = { 0, 1, 1 };\n            up[] = { 0, 0, -1 };\n            positionBack[] = { 0.0749, -0.059, 0.315 };\n            inBack = 1;\n            enableZoom = 0;\n            zoomDuration = 0.5;\n            class Animations\n            {\n                class Pointer\n                {\n                    type = \"rotation\";\n                    source = \"compassPointer\";\n                    selection = \"kompas\";\n                    axis = \"osa kompasu\";\n                    memory = 1;\n                    animPeriod = 0;\n                    minValue = \"rad -180\";\n                    maxValue = \"rad 180\";\n                    angle0 = \"rad -180\";\n                    angle1 = \"rad 180\";\n                };\n                class Arrow\n                {\n                    type = \"rotation\";\n                    source = \"compassArrow\";\n                    selection = \"arrow\";\n                    axis = \"osa kompasu\";\n                    memory = 1;\n                    animPeriod = 0;\n                    minValue = \"rad -180\";\n                    maxValue = \"rad 180\";\n                    angle0 = \"rad -180\";\n                    angle1 = \"rad 180\";\n                };\n                class Cover\n                {\n                    type = \"rotation\";\n                    source = \"compassCover\";\n                    selection = \"vicko\";\n                    axis = \"osa vicka\";\n                    memory = 1;\n                    animPeriod = 0;\n                    angle0 = 0;\n                    angle1 = \"rad -81\";\n                };\n            };\n        };\n    };\n};\n```"}],"categories":["Control Types"],"groups":["GUI"]}