Show / Hide Table of Contents

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

  • Improve this Doc
Back to top Copyright © 2016 zwcloud
Generated by DocFX