Git Product home page Git Product logo

imdui's Introduction

ImDui

中文说明

ImDui is a lightweight immediate mode graphical user interface based on Direct2D for c++. It also support GPU Accelerated. The immediate mode graphical user interface is well suited for real-time rendered applications. ImDui can be used for many scenes, such as game engine editors and small tiny applications.

Usage

You can see the userguide in the file main.cpp.

while()
{
    ...
    ImDui::NewFrame();

    // test codes

	ImDui::BeginWindow("ImDui Demo", &show_demo, ImFloat2(20, 20), ImFloat2(400, 200));
	ImDui::Text("Hello ImDui!");
	ImDui::Button("I am a button.");

	static float val_slider = 0.5;
	ImDui::SliderFloat("slider", &val_slider, 0.0f, 1.0f);

	static bool val1 = false;
	static bool val2 = false;
	ImDui::CheckBox("checkbox1", &val1); ImDui::SameLine(100);
	ImDui::CheckBox("checkbox2", &val2);

	static int e = 0;
	ImDui::RadioButton("radio a", &e, 0); ImDui::SameLine(100);
	ImDui::RadioButton("radio b", &e, 1); ImDui::SameLine(200);
	ImDui::RadioButton("radio c", &e, 2);

	static float col1[3] = { 1.0f,0.0f,0.2f };
	ImDui::ColorEdit3("color editor 1", col1);
	ImDui::EndWindow();

    g_pMainRT->BeginDraw();
    g_pMainRT->Clear(clear_color.ToD2DColorF());
    ImDui::Render();
    g_pMainRT->EndDraw();
    ...
}

Screenshots

sample1

sample2

Demo

the demo application here: ImDui_test

imdui's People

Contributors

ray1024 avatar

Stargazers

 avatar

Watchers

 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.