ソースを参照

Merge pull request #1587 from Areloch/ProfilerMenuTool

Profiler toggle and World Editor menu entry.
Areloch 9 年 前
コミット
5122360552

+ 6 - 1
Templates/Full/game/scripts/client/default.bind.cs

@@ -618,7 +618,12 @@ GlobalActionMap.bind(keyboard, "ctrl o", bringUpOptions);
 function showMetrics(%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);
 

+ 1 - 0
Templates/Full/game/tools/worldEditor/scripts/menus.ed.cs

@@ -262,6 +262,7 @@ function EditorGui::buildMenus(%this)
       barTitle = "Tools";
          
       item[0] = "Network Graph" TAB "n" TAB "toggleNetGraph();";
+      item[1] = "Profiler" TAB "ctrl F2" TAB "showMetrics(true);";
    };
    %this.menuBar.insert(%toolsMenu, %this.menuBar.getCount());