Monogame.ImGui 1.0.0

dotnet add package Monogame.ImGui --version 1.0.0
NuGet\Install-Package Monogame.ImGui -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Monogame.ImGui" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Monogame.ImGui --version 1.0.0
#r "nuget: Monogame.ImGui, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Monogame.ImGui as a Cake Addin
#addin nuget:?package=Monogame.ImGui&version=1.0.0

// Install Monogame.ImGui as a Cake Tool
#tool nuget:?package=Monogame.ImGui&version=1.0.0

Monogame.ImGui

This is a Monogame wrapper for the ImGui.NET Library (https://github.com/mellinoe/ImGui.NET). Monogame.ImGui lets you build graphical interfaces for your Monogame games using a simple immediate-mode style.

Disclaimer: This code wasn't written by me, I just fixed a few things and uploaded it to a GitHub and NuGet. The code of the user I got it from: https://twitter.com/BinaryEyesDev

Usage

To use Monogame.ImGui, download this library using NuGet inside your Monogame project. In your Game1, Initialize ImGuiRenderer like so:

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.ImGui;



namespace YourGame
{
    public class Game1 : Game
    {
        public GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        public ImGUIRenderer GuiRenderer; //This is the ImGuiRenderer
    }
    
    public Game1()
    {
        GuiRenderer = new ImGUIRenderer(this).Initialize().RebuildFontAtlas();

        graphics = new GraphicsDeviceManager(this);
        Content.RootDirectory = "Content";

    }
...

And then in the Draw event, you need to add GuiRenderer.BeginLayout(gameTime); and GuiRenderer.EndLayout(); Like so:

...
protected override void Draw(GameTime gameTime)
{
    graphics.GraphicsDevice.Clear(Color.Coral);

    spriteBatch.Begin();
    //Your regular Game draw calls
    spriteBatch.End();

    base.Draw(gameTime);
    
    GuiRenderer.BeginLayout(gameTime);

    //Insert Your ImGui code

    GuiRenderer.EndLayout();

}
...
Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 2,986 9/26/2019