Note: This is for applications only (at the moment). Web deployment may be possible - to be investigated.
The aim is to provide a cairo based UI for Defold to make building interesting and modern interfaces easier.
The current systems uses a state manager to control the flow of UI execution. This is not required. This is to make building GUI applications a little easier and it maps in nicely to Defold state processes.
All of this wouldnt work without some awesome libs:
- Cairo toolkit [ https://www.cairographics.org/ ]
- ImageLoader Extension for Defold [ https://github.com/Lerg/extension-imageloader ]
- xml2lua for Svg loading [ https://github.com/manoelcampos/xml2lua ]
- feather icons [ https://feathericons.com/ ]
If I have missed anyone, please let me know.
Feb 2021: In its current state its very rudimentary. It has support for a number of widget types and some very basic V1.0 svg. It is completely usable though. Buttons, listboxes, MultiImage, Sliders, and much more is available and working. Sample:
Only tested on Linux, but should work on Windows and OSX. Android and IOS I need to build cairo for them to be usable.
Im working on:
- making this SVG import much better (support wider SVG versions).
- improving reliability for some of the widgets (slider)
- Adding more widgets
- A better, simple demonstration of all the widgets.
Performance is average. A full screen of 1440x1050 with large widgets will get around 50fps on a mid level PC.
All drawing is CPU compositied - which is slow and its done every frame.
This will change. Eventually all rendering will be via cached surfaces, which should result in 10-100x performance improvements (depending on the dynamic nature of your UI).