Hide developer-only settings behind a hidden setting.

This commit is contained in:
Paul Chote
2018-12-26 16:27:53 +13:00
committed by reaperrr
parent 601990aa27
commit 69105180eb
4 changed files with 117 additions and 70 deletions

View File

@@ -87,6 +87,8 @@ namespace OpenRA
public class DebugSettings
{
public bool DisplayDeveloperSettings = false;
public bool BotDebug = false;
public bool LuaDebug = false;
public bool PerfText = false;

View File

@@ -495,6 +495,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var ssi = panel.Get<CheckboxWidget>("SENDSYSINFO_CHECKBOX");
ssi.IsDisabled = () => !gs.FetchNews;
panel.Get("DEBUG_OPTIONS").IsVisible = () => ds.DisplayDeveloperSettings;
panel.Get("DEBUG_HIDDEN_LABEL").IsVisible = () => !ds.DisplayDeveloperSettings;
return () => { };
}

View File

@@ -571,8 +571,29 @@ Container@SETTINGS_PANEL:
Y: 200
Width: PARENT_RIGHT
Font: Bold
Text: Debug
Text: Developer
Align: Center
Container@DEBUG_HIDDEN_LABEL:
Y: 250
Width: PARENT_RIGHT
Children:
Label@A:
Width: PARENT_RIGHT
Height: 20
Font: Regular
Text: Additional developer-specific options can be enabled via the
Align: Center
Label@B:
Y: 20
Width: PARENT_RIGHT
Height: 20
Font: Regular
Text: Debug.DisplayDeveloperSettings setting or launch flag
Align: Center
Container@DEBUG_OPTIONS:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Checkbox@BOTDEBUG_CHECKBOX:
X: 15
Y: 220

View File

@@ -582,8 +582,29 @@ Background@SETTINGS_PANEL:
Y: 200
Width: PARENT_RIGHT
Font: Bold
Text: Debug
Text: Developer
Align: Center
Container@DEBUG_HIDDEN_LABEL:
Y: 250
Width: PARENT_RIGHT
Children:
Label@A:
Width: PARENT_RIGHT
Height: 20
Font: Regular
Text: Additional developer-specific options can be enabled via the
Align: Center
Label@B:
Y: 20
Width: PARENT_RIGHT
Height: 20
Font: Regular
Text: Debug.DisplayDeveloperSettings setting or launch flag
Align: Center
Container@DEBUG_OPTIONS:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Checkbox@BOTDEBUG_CHECKBOX:
X: 15
Y: 220