Code Monkey home page Code Monkey logo

imgui's Introduction

Hello ImGui,

Hello ImGui is an immediate mode GUI library inspired by IMGUI of Unity3D and dear imgui.

It's still a work in progress.

code sample

Now it runs on Win10, Linux(Ubuntu 16.04) and Android. See platforms. Mac and iPhone are not supported because I don't have them.

Get Started

Windows and Linux

  1. Clone ImGui
git clone https://github.com/zwcloud/ImGui.git
  1. Create a .NET7 console project and reference ImGui.
mkdir MyImGuiApp

Create MyImGuiApp.csproj with following content:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>exe</OutputType>
    <TargetFramework>net7.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <ProjectReference Include=".\ImGui\src\ImGui\ImGui.csproj" />
  </ItemGroup>
</Project>
  1. Add Program.cs to your project,

    using ImGui;
    var demo = new Demo();
    Application.Run(new Form(new Rect(320, 180, 1280, 720)), () =>
    {
        demo.OnGUI();
        ImGui.GUILayout.Label("Hello, ImGui!");
    });
  2. Build your project

  3. Run

    • run with Visual Studio 2022: Press F5
    • run on Windows/Linux:
      cd MyImGuiApp
      dotnet MyApp.dll
      
  4. Exit

    Press Esc or click the close button of the window.

Android

  1. Copy Android Templates project. Referenced shared project Demo can be removed if not needed.
  2. Add your GUI code in MainForm.OnGUI.
  3. Build and deploy it to your Android device.

Documentation

For now, please refer to the shared project Demo for how to use Hello ImGui.

Dependency

  • Xamarin.Android: Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#. It mainly provides C# runtime for ImGui.

Credits

ImGui doesn't depend on following projects, some code used by ImGui are taken from them.

  • BigGustave: Open, read and create PNG images in fully managed C#.
  • Typography: C# Font Reader (TrueType / OpenType / OpenFont) , Glyphs Layout and Rendering
  • OpenTK: low-level C# wrapper for OpenGL
  • CSharpGL: Object Oriented OpenGL in C#

Droid Sans and Terminus TTF fount, see fonts/ReadMe.

License

Hello ImGui is licensed under the AGPL License, see LICENSE for more information.

imgui's People

Contributors

zwcloud avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.