diff options
| author | Michael <[email protected]> | 2017-03-09 09:53:00 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-03-09 09:53:00 -0500 |
| commit | 02fd7a883b4592a2200c4f3e912e56bdc09bfdbc (patch) | |
| tree | e8efda7855fcdbf32b721879977be6b09202d794 /ShiftOS_TheReturn | |
| parent | 8db3a2e11c6cc58adb2b62fbce1c1f63426b674c (diff) | |
| download | shiftos_thereturn-02fd7a883b4592a2200c4f3e912e56bdc09bfdbc.tar.gz shiftos_thereturn-02fd7a883b4592a2200c4f3e912e56bdc09bfdbc.tar.bz2 shiftos_thereturn-02fd7a883b4592a2200c4f3e912e56bdc09bfdbc.zip | |
callback action can be fired when user closes infobox
Diffstat (limited to 'ShiftOS_TheReturn')
| -rw-r--r-- | ShiftOS_TheReturn/Infobox.cs | 6 | ||||
| -rw-r--r-- | ShiftOS_TheReturn/Scripting.cs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ShiftOS_TheReturn/Infobox.cs b/ShiftOS_TheReturn/Infobox.cs index 3e8fa30..e3308dc 100644 --- a/ShiftOS_TheReturn/Infobox.cs +++ b/ShiftOS_TheReturn/Infobox.cs @@ -55,11 +55,11 @@ namespace ShiftOS.Engine /// </summary> /// <param name="title">Infobox title</param> /// <param name="message">Infobox message</param> - public static void Show(string title, string message) + public static void Show(string title, string message, Action callback = null) { title = Localization.Parse(title); message = Localization.Parse(message); - _infobox.Open(title, message); + _infobox.Open(title, message, callback); } public static void PromptText(string title, string message, Action<string> callback) @@ -89,7 +89,7 @@ namespace ShiftOS.Engine // Infobox Interface public interface IInfobox { - void Open(string title, string msg); + void Open(string title, string msg, Action callback = null); void PromptText(string title, string message, Action<string> callback); void PromptYesNo(string title, string message, Action<bool> callback); } diff --git a/ShiftOS_TheReturn/Scripting.cs b/ShiftOS_TheReturn/Scripting.cs index 940e998..b3e5208 100644 --- a/ShiftOS_TheReturn/Scripting.cs +++ b/ShiftOS_TheReturn/Scripting.cs @@ -357,9 +357,9 @@ end"); [Exposed("infobox")] public class InfoboxFunctions { - public void show(string title, string message) + public void show(string title, string message, Action callback = null) { - Infobox.Show(title, message); + Infobox.Show(title, message, callback); } public void question(string title, string message, Action<bool> callback) |
