{"name":"2D Editor: Layout Customization","title":"2D Editor: Layout Customization","type":"topic","url":"https://community.bistudio.com/wiki/2D_Editor:_Layout_Customization","revid":364506,"updated":"2024-05-16T20:42:05Z","aliases":["Mission Editor: Layout Customization"],"markdown":"### Description\n\n- Arma 3 provides the ability to switch layout of the mission editor's main display. Two layouts are provided by default, but custom made could be added.\n- Layouts are listed in RscDisplayChooseEditorLayout, that could be invoked via layout button in mission editor.\n- Layout is switched without restarting of the game, only restart of mission editor is needed. Automatic restart of editor via *Restart Now* button in MessageBox is much quicker, than manual restart. This could be beneficial when designing new custom made layout.\n- Selected layout is stored in user's profile and so is remembered after game restart.\n\n### Configuration\n\n- New layout could be created via creating .hpp and optionally .sqf file. .hpp should be included in config.cpp. See *A3\\Ui_f\\hpp\\Editor\\RscDisplayArcadeMap_Layout_6.hpp* and *A3\\Ui_f\\scripts\\GUI\\RscDisplayArcadeMap_Layout_6.sqf* as an example.\n- Each layout that should be displayed in RscDisplayChooseEditorLayout should be configured in *A3\\Ui_f\\hpp\\cfgEditorLayouts.hpp*.\n- Parameters of the layout's class:\n  - **name** - name of the class that will be used as resource for the layout. If name of non-existing class is used, *RscDisplayArcadeMap* is used as a failsafe.\n\n    > [!NOTE]\n    > **name** can be anything but should be unique within CfgEditorLayouts.\n  - **displayName** - name that will be displayed in ListBox in RscDisplayChooseEditorLayout.\n  - **layoutPicture** - path to the preview picture of the layout. Picture should have aspect ratio 2:1 and should be stored in *A3\\Ui_f\\data\\GUI\\Rsc\\RscDisplayChooseEditorLayout\\*.\n\n#### Example\n\n```cpp\nclass CfgEditorLayouts\n{\n    class Layout01\n    {\n        name = \"RscDisplayArcadeMap_Layout_2\";\n        displayName = \"$STR_A3_CfgEditorLayouts_Layout011\";  // Streamlined\n        layoutPicture = \"\\A3\\Ui_f\\data\\GUI\\Rsc\\RscDisplayChooseEditorLayout\\Layout_2.paa\";\n    };\n\n    class Layout02\n    {\n        name = \"RscDisplayArcadeMap_Layout_6\";\n        displayName = \"$STR_A3_CfgEditorLayouts_Layout021\";  // Traditional\n        layoutPicture = \"\\A3\\Ui_f\\data\\GUI\\Rsc\\RscDisplayChooseEditorLayout\\Layout_6.paa\";\n    };\n};\n```","sections":[{"heading":"Description","level":3,"markdown":"- Arma 3 provides the ability to switch layout of the mission editor's main display. Two layouts are provided by default, but custom made could be added.\n- Layouts are listed in RscDisplayChooseEditorLayout, that could be invoked via layout button in mission editor.\n- Layout is switched without restarting of the game, only restart of mission editor is needed. Automatic restart of editor via *Restart Now* button in MessageBox is much quicker, than manual restart. This could be beneficial when designing new custom made layout.\n- Selected layout is stored in user's profile and so is remembered after game restart."},{"heading":"Configuration","level":3,"markdown":"- New layout could be created via creating .hpp and optionally .sqf file. .hpp should be included in config.cpp. See *A3\\Ui_f\\hpp\\Editor\\RscDisplayArcadeMap_Layout_6.hpp* and *A3\\Ui_f\\scripts\\GUI\\RscDisplayArcadeMap_Layout_6.sqf* as an example.\n- Each layout that should be displayed in RscDisplayChooseEditorLayout should be configured in *A3\\Ui_f\\hpp\\cfgEditorLayouts.hpp*.\n- Parameters of the layout's class:\n  - **name** - name of the class that will be used as resource for the layout. If name of non-existing class is used, *RscDisplayArcadeMap* is used as a failsafe.\n\n    > [!NOTE]\n    > **name** can be anything but should be unique within CfgEditorLayouts.\n  - **displayName** - name that will be displayed in ListBox in RscDisplayChooseEditorLayout.\n  - **layoutPicture** - path to the preview picture of the layout. Picture should have aspect ratio 2:1 and should be stored in *A3\\Ui_f\\data\\GUI\\Rsc\\RscDisplayChooseEditorLayout\\*."},{"heading":"Example","level":4,"markdown":"```cpp\nclass CfgEditorLayouts\n{\n    class Layout01\n    {\n        name = \"RscDisplayArcadeMap_Layout_2\";\n        displayName = \"$STR_A3_CfgEditorLayouts_Layout011\";  // Streamlined\n        layoutPicture = \"\\A3\\Ui_f\\data\\GUI\\Rsc\\RscDisplayChooseEditorLayout\\Layout_2.paa\";\n    };\n\n    class Layout02\n    {\n        name = \"RscDisplayArcadeMap_Layout_6\";\n        displayName = \"$STR_A3_CfgEditorLayouts_Layout021\";  // Traditional\n        layoutPicture = \"\\A3\\Ui_f\\data\\GUI\\Rsc\\RscDisplayChooseEditorLayout\\Layout_6.paa\";\n    };\n};\n```"}],"categories":["2D Editor"],"groups":["Mission Editing"]}