Add EnableDebugCommandsInReplays option
This commit is contained in:
@@ -94,6 +94,7 @@ namespace OpenRA
|
|||||||
public bool SendSystemInformation = true;
|
public bool SendSystemInformation = true;
|
||||||
public int SystemInformationVersionPrompt = 0;
|
public int SystemInformationVersionPrompt = 0;
|
||||||
public string UUID = System.Guid.NewGuid().ToString();
|
public string UUID = System.Guid.NewGuid().ToString();
|
||||||
|
public bool EnableDebugCommandsInReplays = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GraphicSettings
|
public class GraphicSettings
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
Game.BeforeGameStart += UnregisterEvents;
|
Game.BeforeGameStart += UnregisterEvents;
|
||||||
|
|
||||||
CloseChat();
|
CloseChat();
|
||||||
chatText.IsDisabled = () => world.IsReplay;
|
chatText.IsDisabled = () => world.IsReplay && !Game.Settings.Debug.EnableDebugCommandsInReplays;
|
||||||
|
|
||||||
var keyListener = chatChrome.Get<LogicKeyListenerWidget>("KEY_LISTENER");
|
var keyListener = chatChrome.Get<LogicKeyListenerWidget>("KEY_LISTENER");
|
||||||
keyListener.OnKeyPress = e =>
|
keyListener.OnKeyPress = e =>
|
||||||
|
|||||||
@@ -674,6 +674,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
BindCheckboxPref(panel, "FETCH_NEWS_CHECKBOX", gs, "FetchNews");
|
BindCheckboxPref(panel, "FETCH_NEWS_CHECKBOX", gs, "FetchNews");
|
||||||
BindCheckboxPref(panel, "LUADEBUG_CHECKBOX", ds, "LuaDebug");
|
BindCheckboxPref(panel, "LUADEBUG_CHECKBOX", ds, "LuaDebug");
|
||||||
BindCheckboxPref(panel, "SENDSYSINFO_CHECKBOX", ds, "SendSystemInformation");
|
BindCheckboxPref(panel, "SENDSYSINFO_CHECKBOX", ds, "SendSystemInformation");
|
||||||
|
BindCheckboxPref(panel, "REPLAY_COMMANDS_CHECKBOX", ds, "EnableDebugCommandsInReplays");
|
||||||
|
|
||||||
return () => { };
|
return () => { };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -585,6 +585,13 @@ Container@SETTINGS_PANEL:
|
|||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Show Map Debug Messages
|
Text: Show Map Debug Messages
|
||||||
|
Checkbox@REPLAY_COMMANDS_CHECKBOX:
|
||||||
|
X: 310
|
||||||
|
Y: 220
|
||||||
|
Width: 300
|
||||||
|
Height: 20
|
||||||
|
Font: Regular
|
||||||
|
Text: Enable Debug Commands in Replays
|
||||||
Button@BACK_BUTTON:
|
Button@BACK_BUTTON:
|
||||||
Key: escape
|
Key: escape
|
||||||
Y: 393
|
Y: 393
|
||||||
|
|||||||
@@ -586,3 +586,10 @@ Background@SETTINGS_PANEL:
|
|||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Show Map Debug Messages
|
Text: Show Map Debug Messages
|
||||||
|
Checkbox@REPLAY_COMMANDS_CHECKBOX:
|
||||||
|
X: 310
|
||||||
|
Y: 220
|
||||||
|
Width: 300
|
||||||
|
Height: 20
|
||||||
|
Font: Regular
|
||||||
|
Text: Enable Debug Commands in Replays
|
||||||
|
|||||||
Reference in New Issue
Block a user