News for hackers. Stuff that matters.
Re:Raygui – A simple and easy-to-use immediate-mode GUI library by setr on Monday March 28, 2022 @01:38AM (#30827450)
It’s ultimately the same; XML largely maps to a class with attributes (and an identifier/navigation through XPATH) fairly strictly.

And it should largely take you the same amount of effort;

    Div ( 
      button(…)
    )
And

    <Div>
       <button>…</button>
    </Div>
is equivalent. Things like separating your definition from your styling isn’t a feature of HTML/CSS, it’s a feature of the API design — the API just happens to be encoded one way or the other. In-line callbacks vs a selector + callbacks is the same as well (you still need a way to navigate the hierarchy, but XPATH & co. makes just as much sense on an object tree as it does on XML — although with code, you could also just keep the pointer around)

I don’t know unity’s API’s, but I’d bet that their GUI API doesn’t actually look much like their XML API; and that if they did, you’d have had just as much, or little, trouble picking it up.

There are no comments on this comment yet.