public DebugOverlay(GameObjectManager game, GameObjectScreen screen, GameWindow window) { this.game = game; this.window = window; var box = new Box(new(0, 0, 500, 200), new(255, 255, 255, 100)); box.Layout = Layout.AnchorTop; updateText = new(new(0, 0, 10, 10), game.Fonts.Get("Assets/IBMPLEXSANS-MEDIUM.TTF", 15), "updates per second", Color.Gray) { Layout = Layout.Fill, TextWrapping = TextWrapMode.WordWrap, HorizontalTextAlignment = HorizontalTextAlignment.Center, VerticalTextAlignment = VerticalTextAlignment.Top }; screen.AddChild(box); game.AddObject(updateText); box.AddChild(updateText); }