Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (45 sloc) 823 Bytes

Program structure

Program.cs

using System;
using ImGui;

namespace EmptyTemplate
{
    class Program
    {
        [STAThread]
        static void Main()
        {
            Application.Run(new MainForm());
        }
    }
}

MainForm.cs

using ImGui;

namespace EmptyTemplate
{
    public class MainForm : Form
    {
        public MainForm() : base(new Rect(400, 300, 250, 450))
        {
        }

        protected override void OnGUI()
        {
            // your GUI code
        }
    }
}

Hello ImGui

The Hello Wolrd Program of ImGui.

In MainForm.cs, override method OnGui:

    protected override void OnGUI()
    {
        GUI.Label(new Rect(0, 0, 100, 30), "Hello ImGui", "helloLabel");
    }

Result:

Hello World Preview

You can’t perform that action at this time.