Skip to content

Repository files navigation

jImGui

Build

Maven Central Version Static Badge

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

The libFDX renderer and platform integration are owned and published by libFDX as io.github.libfdx:imgui_ext.

Supported extensions:

imgui-node-editor
ImGuiColorTextEdit
ImLayout

ImGui current state:

Emscripten Windows Linux Mac Android iOS
⚠️
  • ✅: Have a working build.
  • ⚠️: Have a working build, but it's not ready yet.
  • ❌: Build not ready.

Note:

* Only snapshot builds are currently available. 
* There are 2 ImGui builds. The first contains ImGui only. The second (Ext) contains ImGui with extensions. 

Setup

jImGuiVersion = "-SNAPSHOT"
libFdxVersion = "-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.jImGui:imgui-core:$project.jImGuiVersion")
    implementation("io.github.libfdx:imgui_ext:$project.libFdxVersion")

    // Extensions
    implementation "com.github.xpenatan.jImGui:imlayout-core:$project.jImGuiVersion"
    implementation "com.github.xpenatan.jImGui:textedit-core:$project.jImGuiVersion"
    implementation "com.github.xpenatan.jImGui:nodeeditor-core:$project.jImGuiVersion"
}

Desktop module

dependencies {
    implementation("com.github.xpenatan.jImGui:imgui-jni:$project.jImGuiVersion")
    implementation("com.github.xpenatan.jImGui:imgui-ffm:$project.jImGuiVersion")

    // Extensions
    implementation "com.github.xpenatan.jImGui:imlayout-jni:$project.jImGuiVersion"
    implementation "com.github.xpenatan.jImGui:imlayout-ffm:$project.jImGuiVersion"
    implementation "com.github.xpenatan.jImGui:textedit-jni:$project.jImGuiVersion"
    implementation "com.github.xpenatan.jImGui:textedit-ffm:$project.jImGuiVersion"
    implementation "com.github.xpenatan.jImGui:nodeeditor-jni:$project.jImGuiVersion"
    implementation "com.github.xpenatan.jImGui:nodeeditor-ffm:$project.jImGuiVersion"
}

TeaVM module

dependencies {
    implementation("com.github.xpenatan.jImGui:imgui-web:$project.jImGuiVersion")

    // Extensions
    implementation "com.github.xpenatan.jImGui:imlayout-web:$project.jImGuiVersion"
    implementation "com.github.xpenatan.jImGui:textedit-web:$project.jImGuiVersion"
    implementation "com.github.xpenatan.jImGui:nodeeditor-web:$project.jImGuiVersion"
}

Running examples with Maven artifacts

Examples use the local jImGui projects by default. To run them with published artifacts instead, update these entries in gradle/libs.versions.toml:

[versions]
useRepoLibs = "true"
repoLibVersion = "-SNAPSHOT"

repoLibVersion is used directly as the Maven artifact version. Set it to -SNAPSHOT, a release such as 1.92.9b.0, or any other published version.

Build source

  • Requirements: Java 11, mingw64 and emscripten
  • Windows only for now.

About

ImGui Java Bindings for desktop, mobile and web

Topics

Resources

Stars

48 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages