diff --git a/axios/Axios_settings.cs b/axios/Axios_settings.cs index 056bf20..90dbf2a 100644 --- a/axios/Axios_settings.cs +++ b/axios/Axios_settings.cs @@ -95,6 +95,7 @@ * - Fixed a bug where cleanup actions were being performed in Deactivate instead of Unload in AxiosGameScreen * - Adding IsNullOrWhiteSpace extension for support for Xbox 360 * - Upon some testing - developers will need to use #if WINDOWS/#endif tags to make sure they can't use XNACC in WP7/Xbox360 + * - Adding axioslog command to output AxiosLog * * */ diff --git a/axios/Engine/AxiosCommandConsole.cs b/axios/Engine/AxiosCommandConsole.cs index aaf429c..92a67d0 100644 --- a/axios/Engine/AxiosCommandConsole.cs +++ b/axios/Engine/AxiosCommandConsole.cs @@ -7,6 +7,7 @@ using XNACC.Console; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework; +using Axios.Engine.Log; /* * The empty AxiosCommandConsole is so that when you use the comamnd console @@ -45,17 +46,37 @@ namespace Axios.Engine FadeImage = tmp; } + private void ShowAxiosLog() + { + AddOutputToLog("============"); + foreach (string l in AxiosLog.Instance.GetLogList()) + AddOutputToLog(l); + AddOutputToLog("============"); + } + public override void InitializeCustomCommands() + { + AddCommand(new CmdObject("axioslog", "Displays the current Axios Log", input => { ShowAxiosLog(); })); + base.InitializeCustomCommands(); + } public override void LoadContent(ContentManager content) { base.LoadContent(content); } + protected override void LoadContent() { + if (Font == null) Font = Game.Content.Load("Console"); base.LoadContent(); } + + protected override void UnloadContent() + { + base.UnloadContent(); + ms_commands.Remove("axioslog"); + } } } #else diff --git a/axios/Engine/AxiosGameScreen.cs b/axios/Engine/AxiosGameScreen.cs index 8fae3f6..a2bccca 100644 --- a/axios/Engine/AxiosGameScreen.cs +++ b/axios/Engine/AxiosGameScreen.cs @@ -431,6 +431,7 @@ namespace Axios.Engine { ScreenManager.Game.Components.Remove(_console); _console.Dispose(); + _console = null; } #endif }