"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) | Not planned |
| Viewports | Completed, syncing with docking |
| Windows | WIP |
| Docking | Not planned |
| Widgets | WIP |
| Backends | Currently only have GMod backend |
Loading FreeType fonts and Docking might be too advanced for GMod/Games that enable Lua scripting. I don't think people need that. And they take a lot of time to re-write in Lua so anybody can resort to real binary modules!
Roadmap and task list: TODO
Things to pay attention to: PORT
- Clone this project into your GMod
addonsfolder - Create a singleplayer or multiplayer game
- Run
imgui_testcommand in engine console - You can also write your own test scripts and run them!
GMod x86-64 branch (2026.02.06) 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.
Implementing a Dear ImGui clone in pure Lua.
Thanks to Dear ImGui!
References:
- GitSparTV's LuaJIT Benchmarks
- 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!
