diff --git a/OpenRA.Game/Chrome/DefaultWidgetDelegates.cs b/OpenRA.Game/Chrome/DefaultWidgetDelegates.cs index d2fa2bab32..9cca61d8d9 100644 --- a/OpenRA.Game/Chrome/DefaultWidgetDelegates.cs +++ b/OpenRA.Game/Chrome/DefaultWidgetDelegates.cs @@ -64,6 +64,9 @@ namespace OpenRA.Widgets.Delegates if (w.Id == "SETTINGS_CHECKBOX_INDEXDEBUG") return Game.Settings.IndexDebug; + if (w.Id == "SETTINGS_CHECKBOX_PERFGRAPH") + return Game.Settings.PerfGraph; + return false; } @@ -87,6 +90,12 @@ namespace OpenRA.Widgets.Delegates return true; } + if (w.Id == "SETTINGS_CHECKBOX_PERFGRAPH") + { + Game.Settings.PerfGraph = !Game.Settings.PerfGraph; + return true; + } + return false; } diff --git a/mods/ra/menus.yaml b/mods/ra/menus.yaml index f7ea3428f0..6f98db4a66 100644 --- a/mods/ra/menus.yaml +++ b/mods/ra/menus.yaml @@ -151,6 +151,20 @@ Container: Width:300 Height:25 Text:Show Spatial Index Debug + Checkbox@SETTINGS_CHECKBOX_PERFGRAPH: + Id:SETTINGS_CHECKBOX_PERFGRAPH + X:100 + Y:150 + Width:20 + Height:20 + Delegate:SettingsMenuDelegate + Label@SETTINGS_LABEL_PERFGRAPH: + Id:SETTINGS_LABEL_PERFGRAPH + X:135 + Y:150 + Width:300 + Height:25 + Text:Show Performance Graph Button@SETTINGS_BUTTON_OK: Id:SETTINGS_BUTTON_OK X:PARENT_RIGHT - 180