diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj
index 62eb0ece81..40b12ec5a7 100755
--- a/OpenRA.Game/OpenRA.Game.csproj
+++ b/OpenRA.Game/OpenRA.Game.csproj
@@ -298,6 +298,7 @@
+
diff --git a/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs b/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs
index 72f12ca86e..998e724319 100644
--- a/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs
+++ b/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs
@@ -51,22 +51,6 @@ namespace OpenRA.Widgets.Delegates
Game.Exit();
return true;
};
-
- // Perf text
- var perfText = gameRoot.GetWidget("PERFTEXT");
- perfText.GetText = () => {
- return "RenderFrame {0} ({2:F1} ms)\nTick {4}/ Net{1} ({3:F1} ms)".F(
- Game.RenderFrame,
- Game.orderManager.FrameNumber,
- PerfHistory.items["render"].LastValue,
- PerfHistory.items["tick_time"].LastValue,
- Game.LocalTick);
- };
- perfText.IsVisible = () => {return (perfText.Visible && Game.Settings.PerfText);};
-
- // Perf graph
- var perfGraph = gameRoot.GetWidget("PERFGRAPH");
- perfGraph.IsVisible = () => {return (perfGraph.Visible && Game.Settings.PerfGraph);};
}
}
}
diff --git a/OpenRA.Game/Widgets/PerfGraphWidget.cs b/OpenRA.Game/Widgets/PerfGraphWidget.cs
index 7b6feaaa60..b890892fdb 100644
--- a/OpenRA.Game/Widgets/PerfGraphWidget.cs
+++ b/OpenRA.Game/Widgets/PerfGraphWidget.cs
@@ -38,7 +38,7 @@ namespace OpenRA.Widgets
float2 basis = new float2(-Bounds.Width/100,-Bounds.Height/100);
Game.chrome.lineRenderer.DrawLine(origin, origin + new float2(100, 0) * basis, Color.White, Color.White);
- Game.chrome.lineRenderer.DrawLine(origin + new float2(100,0) * basis, origin + new float2(100,70) * basis, Color.White, Color.White);
+ Game.chrome.lineRenderer.DrawLine(origin + new float2(100,0) * basis, origin + new float2(100,100) * basis, Color.White, Color.White);
foreach (var item in PerfHistory.items.Values)
{
diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs
index 505791949e..29156d22ea 100644
--- a/OpenRA.Game/Widgets/Widget.cs
+++ b/OpenRA.Game/Widgets/Widget.cs
@@ -151,7 +151,11 @@ namespace OpenRA.Widgets
return (T)GetWidget(id);
}
- public Widget GetCurrentMenu() { return Children.FirstOrDefault(c => c.Visible); }
+ public Widget GetCurrentMenu()
+ {
+ // HACK HACK HACK (this method will vanish soon, so not going to hack the widget yaml itself)
+ return Children.FirstOrDefault(c => c.Visible && c.Id != "MUSIC_BG" && c.Id != "PERF_BG");
+ }
public Widget ShowMenu(string menu)
{
diff --git a/mods/ra/menus.yaml b/mods/ra/menus.yaml
index 3ea5c00c80..8b63724634 100644
--- a/mods/ra/menus.yaml
+++ b/mods/ra/menus.yaml
@@ -248,19 +248,6 @@ Container:
Delegate:IngameChromeDelegate
Visible:false
Children:
- PerfGraph@PERFGRAPH:
- Id:PERFGRAPH
- X:10
- Y:WINDOW_BOTTOM - 250
- Width:200
- Height:200
- Label@PERFTEXT:
- Id:PERFTEXT
- Bold: false
- X:10
- Y:WINDOW_BOTTOM - 40
- Width:200
- Height:100
SpecialPowerBin@INGAME_POWERS_BIN:
Id:INGAME_POWERS_BIN
X:0
@@ -309,6 +296,29 @@ Container:
Width:160
Height:25
Text:Quit
+ Background@PERF_BG:
+ Id:PERF_BG
+ Background:dialog4
+ Delegate:PerfDebugDelegate
+ X:10
+ Y:WINDOW_BOTTOM - 250
+ Width: 210
+ Height: 250
+ Visible: true
+ Children:
+ PerfGraph@GRAPH:
+ Id:GRAPH
+ X:5
+ Y:5
+ Width:200
+ Height:200
+ Label@TEXT:
+ Id:TEXT
+ Bold: false
+ X:20
+ Y:210
+ Width:200
+ Height:100
Background@MUSIC_BG:
Id:MUSIC_BG
Delegate:MusicPlayerDelegate