mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-22 08:03:45 +00:00
Prior commit had mangled files somehow. Fixed.
This commit is contained in:
parent
2ca6af8e48
commit
fac951e30d
2 changed files with 2801 additions and 395 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -110,9 +110,13 @@ function EditorGui::buildMenus(%this)
|
|||
};
|
||||
|
||||
// Menu bar
|
||||
%this.menuBar = new MenuBar(WorldEditorMenubar)
|
||||
%this.menuBar = new GuiMenuBar(WorldEditorMenubar)
|
||||
{
|
||||
dynamicItemInsertPos = 3;
|
||||
extent = "1024 20";
|
||||
minExtent = "320 20";
|
||||
horizSizing = "width";
|
||||
profile = "GuiMenuBarProfile";
|
||||
};
|
||||
|
||||
// File Menu
|
||||
|
|
@ -158,7 +162,7 @@ function EditorGui::buildMenus(%this)
|
|||
%fileMenu.appendItem("Exit Level" TAB "" TAB "EditorExitMission();");
|
||||
%fileMenu.appendItem("Quit" TAB %quitShortcut TAB "EditorQuitGame();");
|
||||
|
||||
%this.menuBar.insert(%fileMenu, %this.menuBar.getCount());
|
||||
%this.menuBar.insert(%fileMenu);
|
||||
|
||||
// Edit Menu
|
||||
%editMenu = new PopupMenu()
|
||||
|
|
@ -187,7 +191,7 @@ function EditorGui::buildMenus(%this)
|
|||
item[15] = "Game Options..." TAB "" TAB "Canvas.pushDialog(optionsDlg);";
|
||||
item[16] = "PostEffect Manager" TAB "" TAB "Canvas.pushDialog(PostFXManager);";
|
||||
};
|
||||
%this.menuBar.insert(%editMenu, %this.menuBar.getCount());
|
||||
%this.menuBar.insert(%editMenu);
|
||||
|
||||
// View Menu
|
||||
%viewMenu = new PopupMenu()
|
||||
|
|
@ -201,7 +205,7 @@ function EditorGui::buildMenus(%this)
|
|||
item[ 0 ] = "Visibility Layers" TAB "Alt V" TAB "VisibilityDropdownToggle();";
|
||||
item[ 1 ] = "Show Grid in Ortho Views" TAB %cmdCtrl @ "-Shift-Alt G" TAB "EditorGui.toggleOrthoGrid();";
|
||||
};
|
||||
%this.menuBar.insert(%viewMenu, %this.menuBar.getCount());
|
||||
%this.menuBar.insert(%viewMenu);
|
||||
|
||||
// Camera Menu
|
||||
%cameraMenu = new PopupMenu()
|
||||
|
|
@ -229,7 +233,7 @@ function EditorGui::buildMenus(%this)
|
|||
Item[15] = "Manage Bookmarks..." TAB "Ctrl-Shift B" TAB "EditorGui.toggleCameraBookmarkWindow();";
|
||||
item[16] = "Jump to Bookmark" TAB %this.cameraBookmarksMenu;
|
||||
};
|
||||
%this.menuBar.insert(%cameraMenu, %this.menuBar.getCount());
|
||||
%this.menuBar.insert(%cameraMenu);
|
||||
|
||||
// Editors Menu
|
||||
%editorsMenu = new PopupMenu()
|
||||
|
|
@ -246,7 +250,7 @@ function EditorGui::buildMenus(%this)
|
|||
//item[4] = "Terrain Painter" TAB "F4" TAB TerrainPainterPlugin;
|
||||
//item[5] = "-";
|
||||
};
|
||||
%this.menuBar.insert(%editorsMenu, %this.menuBar.getCount());
|
||||
%this.menuBar.insert(%editorsMenu);
|
||||
|
||||
// Lighting Menu
|
||||
%lightingMenu = new PopupMenu()
|
||||
|
|
@ -263,7 +267,7 @@ function EditorGui::buildMenus(%this)
|
|||
// NOTE: The light managers will be inserted as the
|
||||
// last menu items in EditorLightingMenu::onAdd().
|
||||
};
|
||||
%this.menuBar.insert(%lightingMenu, %this.menuBar.getCount());
|
||||
%this.menuBar.insert(%lightingMenu);
|
||||
|
||||
// Tools Menu
|
||||
%toolsMenu = new PopupMenu()
|
||||
|
|
@ -278,7 +282,7 @@ function EditorGui::buildMenus(%this)
|
|||
item[2] = "Torque SimView" TAB "" TAB "tree();";
|
||||
item[3] = "Make Selected a Mesh" TAB "" TAB "makeSelectedAMesh();";
|
||||
};
|
||||
%this.menuBar.insert(%toolsMenu, %this.menuBar.getCount());
|
||||
%this.menuBar.insert(%toolsMenu);
|
||||
|
||||
// Help Menu
|
||||
%helpMenu = new PopupMenu()
|
||||
|
|
@ -293,7 +297,7 @@ function EditorGui::buildMenus(%this)
|
|||
item[2] = "Offline Reference Guide..." TAB "" TAB "shellexecute(EWorldEditor.documentationReference);";
|
||||
item[3] = "Torque 3D Forums..." TAB "" TAB "gotoWebPage(EWorldEditor.forumURL);";
|
||||
};
|
||||
%this.menuBar.insert(%helpMenu, %this.menuBar.getCount());
|
||||
%this.menuBar.insert(%helpMenu);
|
||||
|
||||
// Menus that are added/removed dynamically (temporary)
|
||||
|
||||
|
|
@ -398,9 +402,9 @@ function EditorGui::setMenuDefaultState(%this)
|
|||
if(! isObject(%this.menuBar))
|
||||
return 0;
|
||||
|
||||
for(%i = 0;%i < %this.menuBar.getCount();%i++)
|
||||
for(%i = 0;%i < %this.menuBar.getMenuCount();%i++)
|
||||
{
|
||||
%menu = %this.menuBar.getObject(%i);
|
||||
%menu = %this.menuBar.getMenu(%i);
|
||||
%menu.setupDefaultState();
|
||||
}
|
||||
|
||||
|
|
@ -414,9 +418,10 @@ function EditorGui::findMenu(%this, %name)
|
|||
if(! isObject(%this.menuBar))
|
||||
return 0;
|
||||
|
||||
for(%i = 0;%i < %this.menuBar.getCount();%i++)
|
||||
|
||||
for(%i = 0; %i < %this.menuBar.getMenuCount(); %i++)
|
||||
{
|
||||
%menu = %this.menuBar.getObject(%i);
|
||||
%menu = %this.menuBar.getMenu(%i);
|
||||
|
||||
if(%name $= %menu.barTitle)
|
||||
return %menu;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue