From d297ea02dbb32cd0ed486926a5bfd296addfdbdf Mon Sep 17 00:00:00 2001 From: Mezo <47868851+Mezo-hx@users.noreply.github.com> Date: Sun, 2 Jul 2023 00:12:17 -0400 Subject: [PATCH] Update README.md --- README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bd422a..863b4c5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,51 @@ Monogame.ImGuiNet_Logo # Monogame.ImGuiNet -An updated wrapper based on Monogame.ImGui, which seemingly discontinued. +Monogame.ImGuiNet is a wrapper for ImGui.Net specifically designed for use with Monogame. + +# Getting Started + +The project is a NuGet Package, which could be installed by typing the following command in your Project Command Line Interface (CLI): +`dotnet add package Monogame.ImGuiNet` + +Once installed in your project, you can use the library by typing: +`using Monogame.ImGuiNet` + +In your game's Initializtion code, create an instance of the ImGuiRenderer class: +```cs +private ImGuiRenderer _imGuiRenderer; + +protected override void Initialize() +{ + // ... + + _imGuiRenderer = new ImGuiRenderer(this); + _imGuiRenderer.RebuildFontAtlas(); + + // ... +} +``` + +Next, in your game's **Draw** method, draw the Interface: +```cs +protected override void Draw(GameTime gameTime) +{ + // ... + + GuiRenderer.BeginLayout(gameTime); + + // ImGui Code + + GuiRenderer.EndLayout(); + + // ... +} +``` + +And you should be good to go! + +It'll be recommended to visit the Wiki page! It will provide general information on the library, Usage examples, as well as every method you could use currently! + +# Notable Mentions + +[Dovker](https://github.com/dovker) - For the original [Monogame.ImGui](https://github.com/dovker/Monogame.ImGui)