Tau is a C++ Library for UI
- Glfw
- Vulkan (The LunarG Vulkan SDK must be installed to built Tau)
- Stb Image and Truetype
- Yoga
To start off, first create a tau::Instance.
#include <tau/tau.h>
tau::Instance instance;
Then create a simple component:
const auto component = tau::component([]() {
return tau::view{
.layout = { .width = 500.0f, .height = 500.0f },
// Styling elements is done by combining different primitives, each unique combination will generate its own Fragment Shader
.style = tau::Gradient{ .from = tau::rgb(128, 141, 143), .to = tau::rgb(47, 50, 51) } | tau::Border{ .corner_radius = 4, .width = 2, .color = tau::rgb(0, 202, 0) },
.onClick = [](tau::element&, tau::MouseEvent&) {
// do stuff
}
}();
});
After that, you can tell your instance to render the root component:
instance.render(component());