Example #1
0
        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);
        }
Example #2
0
 public PlayScreen(GameObjectManager game, GameObjectScreen screen, GameWindow window)
 {
     screen.AddChild(game.AddObject(new Sprite(new(0, 0, 0, 0), "Assets/UI/[ Pink Dreams ].png")
     {
         Layout = Layout.Fill
     }));