Reorder and document advanced settings.
This commit is contained in:
@@ -87,31 +87,50 @@ namespace OpenRA
|
||||
|
||||
public class DebugSettings
|
||||
{
|
||||
public bool DisplayDeveloperSettings = false;
|
||||
|
||||
public bool BotDebug = false;
|
||||
public bool LuaDebug = false;
|
||||
[Desc("Display average FPS and tick/render times")]
|
||||
public bool PerfText = false;
|
||||
|
||||
[Desc("Display a graph with various profiling traces")]
|
||||
public bool PerfGraph = false;
|
||||
|
||||
[Desc("Amount of time required for triggering perf.log output.")]
|
||||
public float LongTickThresholdMs = 1;
|
||||
|
||||
public bool SyncCheckUnsyncedCode = false;
|
||||
public bool SyncCheckBotModuleCode = false;
|
||||
[Desc("Numer of samples to average over when calculating tick and render times.")]
|
||||
public int Samples = 25;
|
||||
|
||||
public bool StrictActivityChecking = false;
|
||||
|
||||
[Desc("Check whether a newer version is available online.")]
|
||||
public bool CheckVersion = true;
|
||||
|
||||
[Desc("Allow the collection of anonymous data such as Operating System, .NET runtime, OpenGL version and language settings.")]
|
||||
public bool SendSystemInformation = true;
|
||||
|
||||
[Desc("Version of sysinfo that the player last opted in or out of.")]
|
||||
public int SystemInformationVersionPrompt = 0;
|
||||
public string UUID = System.Guid.NewGuid().ToString();
|
||||
|
||||
[Desc("Sysinfo anonymous user identifier.")]
|
||||
public string UUID = Guid.NewGuid().ToString();
|
||||
|
||||
[Desc("Enable hidden developer settings in the Advanced settings tab.")]
|
||||
public bool DisplayDeveloperSettings = false;
|
||||
|
||||
[Desc("Display bot debug messages in the game chat.")]
|
||||
public bool BotDebug = false;
|
||||
|
||||
[Desc("Display Lua debug messages in the game chat.")]
|
||||
public bool LuaDebug = false;
|
||||
|
||||
[Desc("Enable the chat field during replays to allow use of console commands.")]
|
||||
public bool EnableDebugCommandsInReplays = false;
|
||||
|
||||
[Desc("Amount of time required for triggering perf.log output.")]
|
||||
public float LongTickThresholdMs = 1;
|
||||
|
||||
[Desc("Throw an exception if the world sync hash changes while evaluating user input.")]
|
||||
public bool SyncCheckUnsyncedCode = false;
|
||||
|
||||
[Desc("Throw an exception if the world sync hash changes while evaluating BotModules.")]
|
||||
public bool SyncCheckBotModuleCode = false;
|
||||
|
||||
[Desc("Throw an exception if an actor activity is ticked after it has been marked as completed.")]
|
||||
public bool StrictActivityChecking = false;
|
||||
}
|
||||
|
||||
public class GraphicSettings
|
||||
|
||||
@@ -480,21 +480,24 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var ss = Game.Settings.Server;
|
||||
var gs = Game.Settings.Game;
|
||||
|
||||
// Advanced
|
||||
BindCheckboxPref(panel, "NAT_DISCOVERY", ss, "DiscoverNatDevices");
|
||||
BindCheckboxPref(panel, "PERFTEXT_CHECKBOX", ds, "PerfText");
|
||||
BindCheckboxPref(panel, "PERFGRAPH_CHECKBOX", ds, "PerfGraph");
|
||||
BindCheckboxPref(panel, "CHECKUNSYNCED_CHECKBOX", ds, "SyncCheckUnsyncedCode");
|
||||
BindCheckboxPref(panel, "CHECKBOTSYNC_CHECKBOX", ds, "SyncCheckBotModuleCode");
|
||||
BindCheckboxPref(panel, "BOTDEBUG_CHECKBOX", ds, "BotDebug");
|
||||
BindCheckboxPref(panel, "FETCH_NEWS_CHECKBOX", gs, "FetchNews");
|
||||
BindCheckboxPref(panel, "LUADEBUG_CHECKBOX", ds, "LuaDebug");
|
||||
BindCheckboxPref(panel, "SENDSYSINFO_CHECKBOX", ds, "SendSystemInformation");
|
||||
BindCheckboxPref(panel, "CHECK_VERSION_CHECKBOX", ds, "CheckVersion");
|
||||
BindCheckboxPref(panel, "REPLAY_COMMANDS_CHECKBOX", ds, "EnableDebugCommandsInReplays");
|
||||
|
||||
var ssi = panel.Get<CheckboxWidget>("SENDSYSINFO_CHECKBOX");
|
||||
ssi.IsDisabled = () => !gs.FetchNews;
|
||||
|
||||
// Developer
|
||||
BindCheckboxPref(panel, "BOTDEBUG_CHECKBOX", ds, "BotDebug");
|
||||
BindCheckboxPref(panel, "LUADEBUG_CHECKBOX", ds, "LuaDebug");
|
||||
BindCheckboxPref(panel, "REPLAY_COMMANDS_CHECKBOX", ds, "EnableDebugCommandsInReplays");
|
||||
BindCheckboxPref(panel, "CHECKUNSYNCED_CHECKBOX", ds, "SyncCheckUnsyncedCode");
|
||||
BindCheckboxPref(panel, "CHECKBOTSYNC_CHECKBOX", ds, "SyncCheckBotModuleCode");
|
||||
|
||||
panel.Get("DEBUG_OPTIONS").IsVisible = () => ds.DisplayDeveloperSettings;
|
||||
panel.Get("DEBUG_HIDDEN_LABEL").IsVisible = () => !ds.DisplayDeveloperSettings;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user