public static void WriteLine(string line, bool Time) { //(newLine == true ? "\n" : "") data.ConsoleLog.text += "\n " + (Time == true ? RitchTextHelper.Combine( "|" + DateTime.Now.ToString("HH:mm:ss") + "| ", RitchTextHelper.ColorToHex(data.TimeTextColor), false, true) : "") + RitchTextHelper.DoColor(data.LineChar + line, RitchTextHelper.ColorToHex(data.DefaultTextColor)); }
static void SearchCommand(string rawCommand) { WriteLine(" " + RitchTextHelper.Combine(rawCommand, RitchTextHelper.ColorToHex(data.TypedCommandColor), false, true)); rawCommand = rawCommand.Substring(1, data.ConsoleInputField.text.Length - 1); if (string.IsNullOrEmpty(rawCommand.Substring(1, rawCommand.Length - 1))) { WriteLine(RitchTextHelper.Combine("Unreco cmd", RitchTextHelper.ColorToHex(data.ErrorCommandColor), true, false)); } else { try { consoleBase.Invoke(rawCommand); } catch (Exception e) { var be = e.GetBaseException(); WriteLine(RitchTextHelper.Combine("Unreco cmd", RitchTextHelper.ColorToHex(data.ErrorCommandColor), true, false) + "(Details): " + be.Message); } } }
public static void PrintErrorMessage(string errorMsg, bool newline) { WriteLine(RitchTextHelper.Combine(errorMsg, RitchTextHelper.ColorToHex(data.ErrorCommandColor), true, false), newline); }
public static void PrintErrorMessage(string errorMsg, string pasted) { WriteLine(RitchTextHelper.Combine(errorMsg, RitchTextHelper.ColorToHex(data.ErrorCommandColor), true, false) + ": " + pasted); }