Exemplo n.º 1
0
 public override void _EnterTree()
 {
     // This is done in _EnterTree so that we get the signal of other autoloads being added to the tree
     Instance = this;
     OnScreenDebug.Init();
     GetTree().Connect("node_added", this, nameof(OnNodeAdded));
     GetTree().Connect("node_removed", this, nameof(OnNodeRemoved));
 }
Exemplo n.º 2
0
 // Creates the UI control for the debug screen
 private void CreateControls()
 {
     DisplayLabel             = new RichTextLabel();
     DisplayLabel.Name        = nameof(DisplayLabel);
     DisplayLabel.Text        = "";
     DisplayLabel.MouseFilter = MouseFilterEnum.Ignore;
     DisplayLabel.RectMinSize = GetViewport().GetVisibleRect().Size;
     if (DebugMenu.GetFont() != null)
     {
         DisplayLabel.AddFontOverride("normal_font", DebugMenu.GetFont());
     }
     AddChild(DisplayLabel);
 }