#2051 fixed -- Widget.Get() throws by default

This commit is contained in:
Chris Forbes
2012-04-27 19:39:07 +12:00
parent 5d1a071287
commit c30d46c014
52 changed files with 409 additions and 398 deletions

View File

@@ -19,9 +19,9 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
public CncPerfDebugLogic(Widget widget)
{
// Performance info
var perfRoot = widget.GetWidget("PERFORMANCE_INFO");
var perfRoot = widget.Get("PERFORMANCE_INFO");
perfRoot.IsVisible = () => Game.Settings.Debug.PerfGraph;
var text = perfRoot.GetWidget<LabelWidget>("PERF_TEXT");
var text = perfRoot.Get<LabelWidget>("PERF_TEXT");
text.IsVisible = () => Game.Settings.Debug.PerfText;
text.GetText = () =>
"Tick {0} @ {1:F1} ms\nRender {2} @ {3:F1} ms\nBatches: {4}".F(