Hide developer-only settings behind a hidden setting.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 () => { };
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user