/RoImGui

Deprecated in favour of Iris

Primary LanguageLua

Deprecated in favour of Iris.

RoImGui

A powerful, versatile and ridiculously easy-to-use immediate mode UI library for Roblox projects. RoImGui is a visual library for testing and debugging of code through on-screen windows and panels which are hooked to anywhere in your project.

[RoImGui Preview Window]

RoImGui
About - Features
Images - Releases
Install - Build
Contriubte - Credits

About

The library is based heavily, both in code and style, off Dear ImGui, an open source immediate mode library for C++.

RoImGui is not designed for building front-end interfaces due to its limited individual control over the styling of UI elements. If you want to make a UI for players then I would recommend either Fusion by Elttob or Roact by Roblox.

Immediate-Mode Graphical User Interface (ImGui)

Immediate-mode UIs are an entirely different way of developing UI compared to the much more common retain-mode UI frameworks. With immediate-mode UIs you do not need to manage the initialisation, updating or cleanup of UI elements or worry about managing state. Elements are created each frame and can be appended to anywhere in the codebase.

Features

  • Window
    • Title
      • Collapsing
      • Close
      • Double-click Close
    • Menubar
      • Dropdown
    • Frame
    • Moving
    • Resizing
  • Text
    • Text
    • Indent
    • Disabled
    • Bullet
    • Coloured
    • Tree Node
    • Selectable
  • Button
    • Button
    • Coloured Button
    • Arrow Button
    • Repeat Button
    • Disabled
    • Checkbox
    • Radio
  • Input
    • Combobox
    • Listbox
    • Text
    • Number
      • Integer or Float
      • Increment
      • Drag
    • Vector2
      • Integer or Float
      • Increment
      • Drag
    • Vector3
      • Interger or Float
      • Increment
      • Drag
    • Enum
    • Color3
  • Table
  • Ploting
    • Line
    • Histogram
    • Progress
  • Collapsing Header
    • Collapsing
    • Closing

Releases

The latest release is version 0.1.0-alpha and can be found here.

The changelog can be found here.

The version naming scheme uses Semantic Version 2.0.0.

Install

You can use RoImGui by either:

  • Installing the plugin to ensure RoImGui stays up-to-date: RoImGui Plugin
  • Downloading the .rbxm file from Itch.io: Itch.io
  • Downloading the latest .rbxm release from the GitHub releases: Releases
  • Building the project yourself: Build

Contribute

RoImGui is designed to produce a very similar experience to Dear ImGui and thus the API and Style is a very near copy.

Bugs

If you find a bug, ensure that there is not already a bug report, especially if it is not on the latest release. If it is a new bug then open an issue. Make the title clear and concise and include as much detail possible in the description including full reproduction steps and any images or videos relevant to the bug. If you cannot reproduce the bug multiple times then it is unlikely that I can help. If you realise the issue was on your side, then you can just close the issue.

Tweaks

I will undoubtedly make spelling mistakes and inconsistencies in the documentation and code for RoImGui. You can open up an issue or make a pull request if you want to update it yourself.

New Features

There are so many features I can add at a time. For now, these features are based off what is included in Dear ImGui which may be altered to work in Roblox. Check that your features is not already in Features before requesting it to be added. I may add your request to the list so that I can work on it later. Alternatively, you can code it yourself and submit a pull request.

Pull Requests

If you want to add code to the project then ensure that you are using StyLua to style check your code before typing. Please read through my code to see my coding style. Commits have a specific style and follow the scheme below:

👆 [MAIN POINTS]

✨ New features:
	[NEW ADDITIONS]

🔧 Tweaks, changes and bug-fixes:
	[NOT-NEW ADDITIONS]

😡 Known bugs and issues to fix:
	[NEW BUG AND ISSUE ADDITIONS]

For example, the folling merge uses:

  • a relatively short description of each change or addition.
    • documentation even though it may be small
  • an emoji for each line which is relevant to the feaure.
  • except for the ✨ New features: or 🔧 Tweaks, changes and bug-fixes: lines which are unchanged.
✏️ Text and Indents

✨ New features:
	✏️ New :Text() API to create text directly in the window!
	👉 Indent and Unindent text.
	🖼️ Window frame background.
	🪟 Debug window with Id and Window statuses.

🔧 Tweaks, changes and bug-fixes:
	🖨️ Fixed the font API and centralised it in the Style.lua file.
	🌈 Created some default variables for black and white.
	🖱️ Moved DrawCursor to be on a per-element basis rather than per-window.
	🖼️ ElementFrames are now appended and popped from a stack to place items.
	🟦 Window titles will maintain width when collapsed.
	💡 Fixed flickering of elements by moving cleanup to the end so deleted elements would not be rendered.
	↖️↘️ Instances now use scale to preserve size when resizing.

Build

The library was developed and tested using Rojo but any tool to convert .lua files into Roblox should work.

Rojo

If you want to build the library yourself, you will need to have rojo installed on your system and added as an environment variable.

Build library

  1. Download the source code in the latest release.

  2. Build the library using Rojo:

    rojo build -o RoImGui.rbxmx .\model.project.json
  3. Drag and drop the file into Studio.

Build development place

  1. Download the source code in the latest release.

  2. Build the development place:

    rojo build -o RoImGui.rbxlx .\development.project.json
  3. Open the place:

    .\RoImGui.rbxlx
  4. Connect using Rojo:

    rojo serve .\development.project.json

For more help, check out the Rojo documentation.

Credits

Developed by SirMallard: