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:
<syntaxhighlight lang="cpp">class display3DEN
 
=== Tool ===
<syntaxhighlight lang="cpp">
class ctrlMenuStrip;
class display3DEN
{
{
class Controls
class Controls
{
{
class MenuStrip
class MenuStrip: ctrlMenuStrip
{
{
class CommunityTools
class Items
{
{
items[] =+ {"MyTool"}
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;";
};
};
};
class MyTool
};
};
};
</syntaxhighlight>
 
=== Tools Folder ===
<syntaxhighlight lang="cpp">
class ctrlMenuStrip;
class display3DEN
{
class Controls
{
class MenuStrip: ctrlMenuStrip
{
class Items
{
class Tools
{
items[] += {"ME_MyFolder"};
};
class ME_MyFolder
{
text = "My Awesome Tool";
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";
};
};
};
};
};
</syntaxhighlight>
 
=== Scenario Attributes ===
<syntaxhighlight lang="cpp">
class ctrlMenuStrip;
class display3DEN
{
class Controls
{
class MenuStrip: ctrlMenuStrip
{
class Items
{
{
text = "My Awesome Tool";
class Attributes
expression = "(findDisplay 313) createDisplay 'displayMyAwesomeTool';";
{
items[] += {"ME_MyAttributes"};
};
class ME_MyAttributes
{
text = "My Awesome Attributes";
action = "edit3DENMissionAttributes 'MyScenarioAttributes';";
};
};
};
};
};
};
};
};
};
<syntaxhighlight>
</syntaxhighlight>


[[Category:Eden Editor|Menu Bar: Modding]]
[[Category:Eden Editor|Menu Bar: Modding]]
[[Category:Eden Editor: Modding|Menu Bar: Modding]]
[[Category:Eden Editor: Modding|Menu Bar: Modding]]

Revision as of 18:05, 2 December 2015

Tool

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;";
				};
			};
		};
	};
};

Tools Folder

class ctrlMenuStrip;
class display3DEN
{
	class Controls
	{
		class MenuStrip: ctrlMenuStrip
		{
			class Items
			{
				class Tools
				{
					items[] += {"ME_MyFolder"};
				};
				class ME_MyFolder
				{
					text = "My Awesome Tool";
					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

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';";
				};
			};
		};
	};
};