2using System.Collections.Generic;
4using System.Reflection;
5using System.Diagnostics;
6using System.Runtime.CompilerServices;
10using Microsoft.Xna.Framework;
11using Microsoft.Xna.Framework.Input;
12using Microsoft.Xna.Framework.Graphics;
17 public partial class CUI
19 internal static void AddDebugCommands()
21 AddedCommands.Add(
new DebugConsole.Command(
"cuidebug",
"", CUIDebug_Command));
22 AddedCommands.Add(
new DebugConsole.Command(
"cuimg",
"", CUIMG_Command));
23 AddedCommands.Add(
new DebugConsole.Command(
"cuidraworder",
"", CUIDrawOrder_Command));
24 AddedCommands.Add(
new DebugConsole.Command(
"cuiprinttree",
"", CUIPrintTree_Command));
25 AddedCommands.Add(
new DebugConsole.Command(
"printsprites",
"", PrintSprites_Command));
26 AddedCommands.Add(
new DebugConsole.Command(
"cuidebugprops",
"", CUIDebugProps_Command));
28 DebugConsole.Commands.InsertRange(0, AddedCommands);
31 public static void CUIDebug_Command(
string[] args)
33 if (CUIDebugWindow.Main ==
null) CUIDebugWindow.Open();
34 else CUIDebugWindow.Close();
37 public static void CUIDebugProps_Command(
string[] args)
39 if (CUIPropsDebug.Opened) CUI.Log($
"Already opened");
40 else CUIPropsDebug.Open();
42 public static void CUIMG_Command(
string[] args) => CUIMagnifyingGlass.ToggleEquip();
44 public static void CUIDrawOrder_Command(
string[] args)
46 foreach (CUIComponent c
in CUI.Main.Flat) { CUI.Log(c); }
49 public static void CUIPrintTree_Command(
string[] args)
51 CUI.Main?.PrintTree();
52 CUI.TopMain?.PrintTree();
55 public static void PrintSprites_Command(
string[] args)
57 foreach (GUIComponentStyle style
in GUIStyle.ComponentStyles)
59 CUI.Log($
"{style.Name} {style.Sprites.Count}");