Eden Editor: Configuring Menu Bar: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:


=== Tool ===
[[Eden_Editor:_Menu_Bar|Menu Bar]] is the central control element of the [[Eden Editor]], where all available options and tools are available. When adding the new functionality to the editor, you should strongly consider listing the feature there.
 
== Tool ==
=== Single ===
[[File:3den menuBar tool.jpg|468px]]
[[File:3den menuBar tool.jpg|468px]]
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
Line 29: Line 32:
</syntaxhighlight>
</syntaxhighlight>


=== Tools Folder ===
=== Folder ===
[[File:3den menuBar toolFolder.jpg|468px]]
[[File:3den menuBar toolFolder.jpg|468px]]
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
Line 64: Line 67:
</syntaxhighlight>
</syntaxhighlight>


=== Scenario Attributes ===
== Scenario Attributes ==
When you add a new window with scenario attributes (see [[Eden_Editor:_Modding_Attributes#Scenario|Attributes Modding]] to learn how it can be achieved), the user will still need a way how to access it. The best way is to add a link to the window at the end of '''Attributes''' option.
 
[[File:3den menuBar attributes.jpg|468px]]
[[File:3den menuBar attributes.jpg|468px]]
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">

Revision as of 18:33, 2 December 2015

Menu Bar is the central control element of the Eden Editor, where all available options and tools are available. When adding the new functionality to the editor, you should strongly consider listing the feature there.

Tool

Single

3den menuBar tool.jpg

class ctrlMenuStrip;
class display3DEN
{
	class Controls
	{
		class MenuStrip: ctrlMenuStrip
		{
			class Items
			{
				class Tools
				{
					items[] += {"ME_MyTool"}; // += must be used; you want to expand the array, not override it!
				};
				class ME_MyTool
				{
					text = "My Awesome Tool"; // Item text
					picture = "\MyAddon\data\myAwesomeTool_ca.paa"; // Item picture
					// Expression called upon clicking; ideally, it should call your custom function
					action = "[] call ME_fnc_MyAwesomeTool;";
				};
			};
		};
	};
};

Folder

3den menuBar toolFolder.jpg

class ctrlMenuStrip;
class display3DEN
{
	class Controls
	{
		class MenuStrip: ctrlMenuStrip
		{
			class Items
			{
				class Tools
				{
					items[] += {"ME_MyFolder"};
				};
				class ME_MyFolder
				{
					text = "My Awesome Folder...";
					items[] = {ME_MyTool1, ME_MyTool1}; // Links to items inside the folder
				};
				class ME_MyTool1
				{
					text = "My Awesome Tool 1";
				};
				class ME_MyTool2
				{
					text = "My Awesome Tool 1";
				};
			};
		};
	};
};

Scenario Attributes

When you add a new window with scenario attributes (see Attributes Modding to learn how it can be achieved), the user will still need a way how to access it. The best way is to add a link to the window at the end of Attributes option.

3den menuBar attributes.jpg

class ctrlMenuStrip;
class display3DEN
{
	class Controls
	{
		class MenuStrip: ctrlMenuStrip
		{
			class Items
			{
				class Attributes
				{
					items[] += {"ME_MyAttributes"};
				};
				class ME_MyAttributes
				{
					text = "My Awesome Attributes";
					action = "edit3DENMissionAttributes 'MyScenarioAttributes';";
				};
			};
		};
	};
};