From a6ed985c7018dee7b8486ab98324f9201a3eb1d7 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 23 Mar 2010 07:48:16 +1300 Subject: [PATCH] added perf text option to settings menu --- OpenRA.Game/Chrome/DefaultWidgetDelegates.cs | 9 +++++++++ mods/ra/menus.yaml | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/OpenRA.Game/Chrome/DefaultWidgetDelegates.cs b/OpenRA.Game/Chrome/DefaultWidgetDelegates.cs index 9cca61d8d9..0dce9f5984 100644 --- a/OpenRA.Game/Chrome/DefaultWidgetDelegates.cs +++ b/OpenRA.Game/Chrome/DefaultWidgetDelegates.cs @@ -67,6 +67,9 @@ namespace OpenRA.Widgets.Delegates if (w.Id == "SETTINGS_CHECKBOX_PERFGRAPH") return Game.Settings.PerfGraph; + if (w.Id == "SETTINGS_CHECKBOX_PERFTEXT") + return Game.Settings.PerfText; + return false; } @@ -96,6 +99,12 @@ namespace OpenRA.Widgets.Delegates return true; } + if (w.Id == "SETTINGS_CHECKBOX_PERFTEXT") + { + Game.Settings.PerfText = !Game.Settings.PerfText; + return true; + } + return false; } diff --git a/mods/ra/menus.yaml b/mods/ra/menus.yaml index 6f98db4a66..fd6e980c4d 100644 --- a/mods/ra/menus.yaml +++ b/mods/ra/menus.yaml @@ -165,6 +165,20 @@ Container: Width:300 Height:25 Text:Show Performance Graph + Checkbox@SETTINGS_CHECKBOX_PERFTEXT: + Id:SETTINGS_CHECKBOX_PERFTEXT + X:100 + Y:180 + Width:20 + Height:20 + Delegate:SettingsMenuDelegate + Label@SETTINGS_LABEL_PERFTEXT: + Id:SETTINGS_LABEL_PERFTEXT + X:135 + Y:180 + Width:300 + Height:25 + Text:Show Performance Text Button@SETTINGS_BUTTON_OK: Id:SETTINGS_BUTTON_OK X:PARENT_RIGHT - 180