Skip to content

xzripper/jlImGui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

JlImGui.

import com.raylib.Raylib;

import static com.raylib.Jaylib.BLACK;

import jlImGui.JaylibImGui;

import imgui.ImGui;

public class Main {
    public static void main(String[] args) {
        Raylib.InitWindow(1600, 800, "Window!"); // Initialization.

        Raylib.SetTargetFPS(60);

        JaylibImGui.setupImGui(); // Setup ImGui.

        while (!Raylib.WindowShouldClose()) {
            Raylib.BeginDrawing();

            Raylib.ClearBackground(BLACK);

            JaylibImGui.process(); // Process keyboard/mouse/etc.

            ImGui.newFrame(); // Create new ImGui frame.

            ImGui.showDemoWindow(); // Show Demo Window.

            ImGui.endFrame(); // End ImGui frame.

            JaylibImGui.render(); // Render ImGui & draw data.

            Raylib.EndDrawing();
        }

        JaylibImGui.disposeNDestroy(); // Dispose and destroy ImGui context.

        Raylib.CloseWindow();
    }
}

Specification.

  • Java version used in jlImGui: 8+.
  • lwjgl version used in jlImGui: 3.3.3.
  • Raylib version used in JlImGui: 4.5 (can be lower/higher).
  • imgui-java version used in jlImGui: 1.86.11-all.
  • ImGui version used (and supported) in jlImGui: 1.86.
  • JlImGui version: 1.2.1.

Integration.

To integrate jlImGui into your Java project you have to install latest version of jlImGui (.zip), unzip folder (jlImGui) to your project main directory, after unzip imgui-app-1.86.11-all.jar to your project and add as a dependency in your editor/IDEA/terminal. It's important to add Raylib as a dependency too before running the code.

Knows issues / TODO.

  • No gamepad support: jlImGui does not provide gamepad support for ImGui.

Contribution & License

Feel free to open issues and pull new requests to this project, we will make this project even better! This project has MIT license, it means you can do everything you want with it.

JlImGui V1.2.1