mirror of
https://github.com/AlexMacocian/MonoGame.ImGuiNet.git
synced 2026-07-15 14:39:30 +00:00
Update README.md
This commit is contained in:
@@ -1,4 +1,51 @@
|
|||||||
<img src="Images/ReadMeBanner.png" alt="Monogame.ImGuiNet_Logo" width="100%">
|
<img src="Images/ReadMeBanner.png" alt="Monogame.ImGuiNet_Logo" width="100%">
|
||||||
|
|
||||||
# Monogame.ImGuiNet
|
# 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user