protected override unsafe void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); var mouse = Mouse.GetState(); var keyboard = Keyboard.GetState(); Renderer.BeforeLayout(gameTime.ElapsedGameTime, mouse, keyboard, ""); UserInterface.Draw(GraphicsDevice, mouse, keyboard); Renderer.AfterLayout(); base.Draw(gameTime); }
protected override void Draw(TimeInterval time) { GraphicsDevice.Clear(Color.Gray); Renderer.BeforeLayout(time.Elapsed, MouseState, KeyboardState, FrameTextInput); UserInterface.Draw(GraphicsDevice, MouseState, KeyboardState); if (imgui.Begin("Level")) { for (int y = 0; y < grid.Length; y++) { var cells = grid[y]; for (int x = 0; x < cells.Length; x++) { if (cells[x]) { imgui.SetCursorPos(new System.Numerics.Vector2(x * 100, y * 100)); imgui.Button("", new System.Numerics.Vector2(90, 90)); } } } } Renderer.AfterLayout(); }