simple gui apps based on Lua + Dear ImGui
Goals:
- small executable;
- one self-contained executable;
- desktop feel;
- energy efficient;
- low memory usage;
- easy to integrate (with Lua, event framework)
Features:
- font awesome;
- material design;
- auto update supported;
- helpers for links;
- background image loading;
- basic animations (fade, move) (provide a State object);
- fade out modals by remembering their last draw list;
- layout helpers;
- ligatures (by precomputing the needed symbols, by providing alternative text functions based on AddGlyph)
- parallax effect;
- hidpi (reload fonts if change is detected, use
glfwSetWindowContentScaleCallback
for that).
Anti features:
- webview
Drawbacks:
- image loader (tile based, single texture, so draw calls can be batched);
- touch/pen input on Windows;
- accessibility (integrate with https://github.com/dkager/tolk);
- video decoding.
Loop:
function display()
for reload_textures in gui do
if reload_textures then
add font
add images with correct resolution
end
ImGui::Begin(...)
...
ImGui::End(...)
end
end
Binary size:
- ImGui: 800 KiB
- Fonts (with Font Awesome): 450 KiB
- Lua: 418 KiB
- Indigo embedlib: 725 KiB (Rx, events, dispatch queues, TCP connections, NaCl)
- Indigo embedsynclib: 1100 KiB (JSON + binary object + expressions = 493 KiB, sync client 613 KiB)
- Indigo corelib: 2344 KiB (logger, timecache, sandbox, bsets, memory, cryptohash, geolite, parser for markdown and arithmetic expressions, text utilities, search client, streaming store client, mail client, debug over network, tcp response, debug helpers)
- Indigo lib: 3223 KiB (Lua + extras, PNG, JPEG, async Mustache generator)
Helps to build statically, so not used features are removed from the libraries.
Edited by Bernard van Gastel