mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Added BasicIO mode
If "BasicIO" is passed as last argument, Basic IO will be enabled. - Basic input/output : disable the advanced I/O class from MCC 1.3+ - Do not print colors, output messages directly with §c color tags This allows an external GUI to manage input/output instead of MCC. http://www.minecraftforum.net/topic/1314800-/page__st__180#entry23903618
This commit is contained in:
parent
0128d5c41a
commit
700d345cef
3 changed files with 11 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ namespace MinecraftClient
|
|||
{
|
||||
public static void Reset() { if (reading) { reading = false; Console.Write("\b \b"); } }
|
||||
public static void SetAutoCompleteEngine(IAutoComplete engine) { autocomplete_engine = engine; }
|
||||
public static bool basicIO = false;
|
||||
private static IAutoComplete autocomplete_engine;
|
||||
private static LinkedList<string> previous = new LinkedList<string>();
|
||||
private static string buffer = "";
|
||||
|
|
@ -25,6 +26,7 @@ namespace MinecraftClient
|
|||
#region Read User Input
|
||||
public static string ReadLine()
|
||||
{
|
||||
if (basicIO) { return Console.ReadLine(); }
|
||||
ConsoleKeyInfo k = new ConsoleKeyInfo();
|
||||
Console.Write('>');
|
||||
reading = true;
|
||||
|
|
@ -120,6 +122,7 @@ namespace MinecraftClient
|
|||
#region Console Output
|
||||
public static void Write(string text)
|
||||
{
|
||||
if (basicIO) { Console.Write(text); return; }
|
||||
while (reading_lock) { }
|
||||
writing_lock = true;
|
||||
if (reading)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue