Example #1
0
        public DebugNode GetOrCreateChild(string name)
        {
            if (_children.ContainsKey(name))
            {
                return(_children[name]);
            }

            var node = new DebugNode(name);

            _children.Add(name, node);
            return(node);
        }
Example #2
0
 public void Display(DebugNode node, string value)
 {
     if (node.Widget is StringWidget payload)
     {
         payload.SetValue(value);
     }
     else
     {
         node.Widget = new StringWidget(value);
     }
     node.Touch();
 }
Example #3
0
        public void Display(DebugNode node, Texture texture)
        {
            if (node.Widget is TextureWidget payload)
            {
                payload.SetValue(texture);
            }
            else
            {
                node.Widget = new TextureWidget(texture);
            }

            node.Touch();
        }
Example #4
0
        public void Display(DebugNode node, Texture texture)
        {
            var payload = node.Widget as TextureWidget;

            if (payload != null)
            {
                payload.SetValue(texture);
            }
            else
            {
                node.Widget = new TextureWidget(texture);
            }

            node.Touch();
        }
Example #5
0
        public void Display(DebugNode node, string value)
        {
            var payload = node.Widget as StringWidget;

            if (payload != null)
            {
                payload.SetValue(value);
            }
            else
            {
                // New payload
                node.Widget = new StringWidget(value);
            }

            node.Touch();
        }
Example #6
0
        public void Log(DebugNode node, string message)
        {
            if (node.Widget is Logger payload)
            {
                // Existing payload
                payload.Log(message);
            }
            else
            {
                // New payload
                var p = new Logger();
                p.Log(message);
                node.Widget = p;
            }

            node.Touch();
        }
Example #7
0
        public void Log(DebugNode node, string message)
        {
            var payload = node.Widget as Logger;

            if (payload != null)
            {
                // Existing payload
                payload.Log(message);
            }
            else
            {
                // New payload
                var p = new Logger();
                p.Log(message);
                node.Widget = p;
            }

            node.Touch();
        }
Example #8
0
 public void Display(DebugNode node, Vector2 size, Action <Rect> drawAction)
 {
     node.Widget = new CustomUIWidget(size, drawAction);
     node.Touch();
 }
Example #9
0
 public void Display(DebugNode node, float value)
 {
     Display(node, value.ToString(CultureInfo.InvariantCulture));
 }
Example #10
0
 public void Display(DebugNode node, float value)
 {
     Display(node, value.ToString());
 }