add perf graph debug switch to settings menu

This commit is contained in:
Chris Forbes
2010-03-23 07:41:30 +13:00
parent 411b73a75e
commit b15ef59a41
2 changed files with 23 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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