ZLTT (Zig Lua TUI Tool) is a simple toy project to create a simple TUI (Text User Interface). Think of emacs TUI but you don't need 10 years to learn it! 😅
Programs for zltt are written in Lua and zltt uses Zig and SDL to render a GUI.
The Lua API is extremly simple but very versatile. Look at lua/examples/ for example functionality.
Zig SDL2 LuaJIT fontconfig
To build run zig build
To run an example do ./zig-out/bin/zltt lua/examples/todo/init.lua
todo.mp4
rpn.mp4
putMainText(text)
This function prints text to the main screen
putSubText(text)
This function prints text to the bottom line of the screen
handleInputEvent(key)
This function is called when on a KEYDOWN event. The value of key is the ascii integer of the charater.
To recover the character in lua use string.char(key)
- Create GUI with SDL
- Support multiline rendering on main area
- Use fontconfig to load font
- Export print functions to Lua
- Load Lua file
- Support window resizing
- Add function to change font
- Add function to change colors