nicbarker / clay

High performance UI layout library in C.
https://nicbarker.com/clay
zlib License
1.29k stars 31 forks source link

Multi-type elements #34

Closed nicbarker closed 1 month ago

nicbarker commented 1 month ago

This PR streamlines the way elements are declared / opened in clay, and allows you to attach multiple configs / element types to each element.

carbon(88)

the PR also introduces optional IDs and layout config declaration, which together with multiple configs can significantly reduce boilerplate in layout declaration.

It also includes a significant rewrite of the text wrapping logic and cache, which has improved performance by 2-3x.

Migration Guide

This PR introduces significant breaking changes to public APIs. The general process of refactoring should be as follows:

Full details of changelist will be enumerated in the 0.12 release.