public static string GetUserInput(string defaultText, int maxLen, Action spinner) { string output = null; ThreadJumper.Enqueue(delegate { output = Game.GetUserInput(WindowTitle.EnterMessage60, defaultText, maxLen); }); Main.BlockControls = true; Yield(); while (output == null) { spinner.Invoke(); Yield(); } Main.BlockControls = false; return(output); }
public static string GetUserInput(string defaultText, Action spinner) { string output = null; ThreadJumper.Enqueue(delegate { output = Game.GetUserInput(defaultText); }); Main.BlockControls = true; Script.Yield(); while (output == null) { spinner.Invoke(); Script.Yield(); } Main.BlockControls = false; return(output); }