Clay – UI Layout Library
71–80 of 95 posts
Re: Clay – UI Layout Library
#72Re: Clay – UI Layout Library
#73I'm not a frontend person. Can anyone explain why this is better than using CSS directly or a CSS framework/library? Seems like added complexity when there are already hundreds of CSS frameworks available that seem like they do the same thing.
- Mapping components or structured document data with something like MDX or slate on to Clay components to render in different contexts outside the browser reasonably closely to what shows up in a browser preview, for example content for HUDs, in-world display panels or documents in games, or batch rendering printed documents
- Layout for UI where something like Electron or React Native would be overkill, or isn't supported
Re: Clay – UI Layout Library
#74Looks very nice, I just watch a great YT video from the developer here https://www.youtube.com/watch?v=DYWTw19_8r4
It's so rare to see such a clear and intuitive explanation. This video is amazing.
Re: Clay – UI Layout Library
#75The API approach could be implemented extremely cleanly in Clojure and Java, and then the whole thing would be runtime-dynamic, since Clojure generates new Java functions on the fly, and the JVM's JIT makes them fast.
If anyone wants a fun project over the holidays…
Re: Clay – UI Layout Library
#76Earlier quoted context omitted.
The thing is, most GUIs by necessity involve fairly deep hierarchies of graphical objects so you're either going to have deeply nested calls like this, or you're going to scatter the fragments across a number of files in a way that they need to be reassembled in the reader's head in order to understand what's going on.
most GUIs by necessity involve fairly deep hierarchies of graphical objects First, this isn't really true. You might typically have a window, a container, a layout object and then your gui components. Second you don't need nested calls, you just add one component to another. or you're going to scatter the fragments across a number of files Why would that be true? they need to be reassembled in the reader's head in or…
Re: Clay – UI Layout Library
#77Looks impressive! What are the connection/comparison with imgui though?
The examples use Raylib as a renderer behind the layout engine. I suppose it would be possible to use Dear Imgui as a renderer, but you might have to write some glue code.
Re: Clay – UI Layout Library
#78I'm not a frontend person. Can anyone explain why this is better than using CSS directly or a CSS framework/library? Seems like added complexity when there are already hundreds of CSS frameworks available that seem like they do the same thing.
Put another way, this library is a step into writing an agnostic UI layer for your application which it just invokes from its business logic. If you can decouple your UI from your application code ala MVC or MVP architecture, as a developer you can find the right tool for the components that compose the sum of your project.