diff --git a/MLEM/Misc/MlemPlatform.cs b/MLEM/Misc/MlemPlatform.cs index 846586a..d528d9b 100644 --- a/MLEM/Misc/MlemPlatform.cs +++ b/MLEM/Misc/MlemPlatform.cs @@ -4,6 +4,7 @@ using System.Reflection; using System.Threading.Tasks; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Input; +using MLEM.Formatting.Codes; namespace MLEM.Misc { /// @@ -40,7 +41,8 @@ namespace MLEM.Misc { public abstract void AddTextInputListener(GameWindow window, TextInputCallback callback); /// - /// A method that should be executed to open a link in the browser or a file explorer + /// A method that should be executed to open a link in the browser or a file explorer. + /// This method is currently used only by MLEM.Ui's implementation of the formatting code. /// public abstract void OpenLinkOrFile(string link); @@ -131,8 +133,8 @@ namespace MLEM.Misc { /// See class documentation for more detailed information. /// /// The function that is used to display the on-screen keyboard - /// The action that is invoked to open the - public Mobile(OpenOnScreenKeyboardDelegate openOnScreenKeyboard, Action openLink) { + /// The action that is invoked to open a link in the browser, which is used for + public Mobile(OpenOnScreenKeyboardDelegate openOnScreenKeyboard, Action openLink = null) { this.openOnScreenKeyboard = openOnScreenKeyboard; this.openLink = openLink; } @@ -148,7 +150,7 @@ namespace MLEM.Misc { /// public override void OpenLinkOrFile(string link) { - this.openLink(link); + this.openLink?.Invoke(link); } ///