Home

Awesome

gdx-imgui

Build Build Sonatype Nexus (Snapshots) Static Badge

gdx-imgui is a java binding for C++ dear-imgui. <br> It uses webidl file to generate java methods with the help of jParser. <br> It's meant to be small and 1-1 to C++. ImGui::Begin() is ImGui.Begin() and so on.

<p align="center"><img src="https://i.imgur.com/rXk4Aq0.gif"/></p>

Supported extensions:

imgui-node-editor <br> ImGuiColorTextEdit <br> ImLayout <br>

Examples

ImGui current state:

EmscriptenWindowsLinuxMacAndroidiOS
⚠️

Note:

* Only snapshot builds are currently available. 
* It's best to try the examples first to see how it works before adding to your project.
* There are 2 ImGui builds. The first contains ImGui only. The second (Ext) contains ImGui with extensions. 

How to run examples

There are two ways to run examples.

Setup

gdxVersion = "1.12.1"
gdxImguiVersion = "-SNAPSHOT"
// Add repository to Root gradle
repositories {
    mavenLocal()
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}

Core module

dependencies {
    implementation("com.github.xpenatan.gdx-imgui:gdx-impl:$project.gdxImguiVersion")
    implementation("com.github.xpenatan.gdx-imgui:imgui-core:$project.gdxImguiVersion")

    // Or the extension build
    implementation "com.github.xpenatan.gdx-imgui:imgui-ext-core:$project.gdxImguiVersion"
}

Desktop module

dependencies {
    implementation("com.github.xpenatan.gdx-imgui:imgui-desktop:$project.gdxImguiVersion")

    // Or the extension build
    implementation "com.github.xpenatan.gdx-imgui:imgui-ext-desktop:$project.gdxImguiVersion"
}

TeaVM module

dependencies {
    implementation("com.github.xpenatan.gdx-imgui:imgui-teavm:$project.gdxImguiVersion")

    // Or the extension build
    implementation "com.github.xpenatan.gdx-imgui:imgui-ext-teavm:$project.gdxImguiVersion"
}

Build source

##### ImGui
./gradlew :imgui:imgui-build:download_source
./gradlew :imgui:imgui-build:build_project
##### ImGui with extensions. Need to build ImGui first
./gradlew :extensions:imlayout:imlayout-build:build_project
./gradlew :extensions:ImGuiColorTextEdit:textedit-build:download_source
./gradlew :extensions:ImGuiColorTextEdit:textedit-build:build_project
./gradlew :extensions:imgui-node-editor:nodeeditor-build:download_source
./gradlew :extensions:imgui-node-editor:nodeeditor-build:build_project
./gradlew :imgui:imgui-ext-build:build_project