示例#1
0
 public static void ApplyChangesIfModified()
 {
     if (layoutWidth != EMCli.LayoutWidth || layoutHeight != EMCli.LayoutHeight)
     {
         EMCli.SetupGUI(layoutWidth, layoutHeight);
     }
 }
示例#2
0
    public static string SendProcessing(this string input, bool bold = false)
    {
        ConsoleMessage message = new ConsoleMessage(input.RepaintProcessing(bold), DebugLevel.Info);

        message.SendToConsole();
        EMCli.RefreshLayout();
        return(input);
    }
示例#3
0
    public static string SendCli(this string input)
    {
        ConsoleMessage message = new ConsoleMessage(input, DebugLevel.Debug);

        message.SendToConsole();
        EMCli.RefreshLayout();
        return(input);
    }
示例#4
0
 public static void Switch()
 {
     if (IsOpened = !IsOpened)
     {
         EMCli.WindowFunctionMainGUI = WindowFunctionConsoleOptionsGUI;
     }
     else
     {
         EMCli.SwitchBack();
     }
 }
示例#5
0
 public static void OnGUI()
 {
     GUI.backgroundColor = Color.green;
     foreach (DebugLevelOption option in DebugLevelOption.DebugLevelOptions)
     {
         option.Enabled = GUILayout.Toggle(option.Enabled, option.DebugLevel.ToString());
         if (option.NeedRefresh)
         {
             EMCli.RefreshLayout();
         }
     }
 }
示例#6
0
        public void OnGUI()
        {
            if (!FengGameManagerMKII.showHackMenu)
            {
                return;
            }

            GUI.backgroundColor = new Color(0f, 0f, 0f, 1f);
            float left = (Screen.width / 2) - 115f;
            float top  = (Screen.height / 2) - 45f;

            if (GUI.Button(new Rect(left + 13f, top - 120f, 172f, 70f), "Load/spawn..."))
            {
                FengGameManagerMKII.instance.StartCoroutine(EMCli.ConnectAndJoinIE(true));
                FengGameManagerMKII.showHackMenu = false;
            }
        }
示例#7
0
 public static void OnGUI()
 {
     foreach (Command command in CommandHandler.Instance.Commands)
     {
         scroll = GUILayout.BeginScrollView(scroll);
         bool copied = InputLine.inputLine.Equals(command.Name);
         if (GUILayout.Button(command.Name))
         {
             if (!copied)
             {
                 InputLine.inputLine = command.Name;
             }
             else
             {
                 InputLine.inputLine = "/help " + command.Name;
             }
         }
         GUILayout.EndScrollView();
     }
     GUILayout.BeginHorizontal();
     EMCli.InputGUI();
     GUILayout.EndHorizontal();
     GUI.DragWindow();
 }
示例#8
0
 public static void FastLoadAndSpawn(Command command)
 {
     FengGameManagerMKII.instance.StartCoroutine(EMCli.ConnectAndJoinIE(true));
     FengGameManagerMKII.showHackMenu = false;
 }
示例#9
0
 public static void TestConnect(Command command)
 {
     FengGameManagerMKII.instance.StartCoroutine(EMCli.ConnectAndJoinIE(false));
     FengGameManagerMKII.showHackMenu = false;
 }
示例#10
0
 public static void ClearCLILayout(Command command)
 {
     EMCli.ClearLayout();
 }
示例#11
0
 public static void SwitchDebugLevel(Command command)
 {
     EMCli.SwitchDebugLevel((DebugLevel)command.LastArgAsByte);
     EMCli.RefreshLayout();
 }
示例#12
0
 public static void ClearCLIMessages(Command command)
 {
     EMCli.ClearMessages();
     EMCli.RefreshLayout();
 }
示例#13
0
 public void SendToConsole()
 {
     EMCli.AddMessage(this);
 }
示例#14
0
 public static string SendProcessing(this string input, bool bold = false)
 {
     EMCli.AddLine(input.RepaintProcessing(bold));
     return(input);
 }
示例#15
0
 public static string SendError(this string input, bool bold = false)
 {
     EMCli.AddLine(input.RepaintError(bold));
     return(input);
 }
示例#16
0
 public static string SendCli(this string input)
 {
     EMCli.AddLine(input);
     return(input);
 }