mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Makes the profiler pop-up act on a toggle, and also adds an entry into the World Editor's Tool menu to easily activate it.
This commit is contained in:
parent
587ab6a39e
commit
25d2fd877b
2 changed files with 7 additions and 1 deletions
|
|
@ -618,7 +618,12 @@ GlobalActionMap.bind(keyboard, "ctrl o", bringUpOptions);
|
||||||
function showMetrics(%val)
|
function showMetrics(%val)
|
||||||
{
|
{
|
||||||
if(%val)
|
if(%val)
|
||||||
metrics("fps gfx shadow sfx terrain groundcover forest net");
|
{
|
||||||
|
if(!Canvas.isMember(FrameOverlayGui))
|
||||||
|
metrics("fps gfx shadow sfx terrain groundcover forest net");
|
||||||
|
else
|
||||||
|
metrics("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
GlobalActionMap.bind(keyboard, "ctrl F2", showMetrics);
|
GlobalActionMap.bind(keyboard, "ctrl F2", showMetrics);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -262,6 +262,7 @@ function EditorGui::buildMenus(%this)
|
||||||
barTitle = "Tools";
|
barTitle = "Tools";
|
||||||
|
|
||||||
item[0] = "Network Graph" TAB "n" TAB "toggleNetGraph();";
|
item[0] = "Network Graph" TAB "n" TAB "toggleNetGraph();";
|
||||||
|
item[1] = "Profiler" TAB "ctrl F2" TAB "showMetrics(true);";
|
||||||
};
|
};
|
||||||
%this.menuBar.insert(%toolsMenu, %this.menuBar.getCount());
|
%this.menuBar.insert(%toolsMenu, %this.menuBar.getCount());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue