"Give someone state and they'll have a bug one day, but teach them how to represent state in two separate locations that have to be kept in sync and they'll have bugs for a lifetime." - ryg
| Subsystems | Stage |
|---|---|
| Fonts(ttf) | Completed, syncing with main |
| Fonts(otf) | Hasn't started yet, not planned |
| Viewports | Currently only one is supported |
| Windows | WIP |
| Widgets | WIP |
| Backends | Currently only have GMod backend |
- Clone this project into your GMod
addonsfolder - Create a singleplayer game
- Run
imgui_testcommand in engine console - You can also write your own test scripts and run locally
GMod x86-64 branch (2026.1.21) with LuaJIT 2.1.0-beta3, Lua 5.1. Recording this is actually necessary, since who knows how GMod Lua APIs will change in the future!
The core code(code except backend ones) in lua/ don't and shouldn't use anything that is exclusive in GMod Lua.
Try to make an Immediate Mode UI library for Garry's Mod.
In other words, currently I'm implementing an ImGui clone in pure Lua.
Originally I just wanted to make some contributions to RiceLib, and it wasn't the first time that I got terrified by the messy and bloat codebase of it. So I set out to remove all the non-UI related features added by RiceLib author RiceMCUT and to make UI creation for GMod in general easier.
Thanks to Dear ImGui!
References:
- Garry's Mod Wiki
- Jaffies's paint lib
- Valve Developer Wiki
- handsomematt's 3d2d-vgui
- TomDotBat's ui3d2d
Previous Attempts at immediate-mode UIs in GMod:
AIs:
for helping me avoid those areas involving a lot of repeatitive work!
