Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Lgui - any users?

This thread is locked; no one can reply to it. rss feed Print
Lgui - any users?
Jacob Moena
Member #19,324
February 2021
avatar

I have grabbed Frank's Lgui project - https://github.com/frank256/lgui - and added it to my project, but I am not entirely sure how to use it since there's no examples of how to hook it up with an existing project.

The tests is littered with files, and it will take a while to figure out how it all works.

So, since Frank is not watching the repository, I am not sure if he will ever see my ticket or my pull request.

I like the idea of Lgui, and the fact that it uses C++17. So I am probably going to give it a go. It will take a bit of time to get to grips with how it is supposed to be used, though.

So, I am wondering: are any of you using Lgui? And/or have some minimal example code? :)

((Edgar Reynaldo : I know about Eagle. You don't have to sell it to me, I know :P ))

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

frank.n
Member #16,879
July 2018

Hi, thanks for your interest in lgui. :)

Yes, I know, minimal code-centric tutorials are still missing. I'm very busy with work this week, maybe I'll be able to put something together at the weekend. I'll also have a look into your PR then (thank you!)

What would you need / like as a tutorial / example?

There is some documentation, though (Doxygen). The high level concepts are more or less explained in a somewhat longish file here (Doxygen source):
https://github.com/frank256/lgui/blob/develop/src/doc/lgui.dox

But it also contains a small section on getting started (quickstart).

If you compare the points given there to the code in the main lguitest.cpp test file, you should be able to figure out how setting up works. It's not that complicated, really. The perspective stuff is merely to achieve some nicer animation effects and can be safely ignored. :) There are just 3 functions you need to call in your main loop for lgui to work (convert event, push event, draw GUI).
I suppose then it's mostly about creating widgets. For now, you could take a look at the simpler tests, e.g. textfieldbuttontest.cpp for examples of how to create some widgets, layout them, and wire them together (e.g. reflect text somewhere else / react to button clicks).

If you have any further questions, just ask (here / PM / github issues). :)

Jacob Moena
Member #19,324
February 2021
avatar

Thanks! Yes, I guess it's time to get doxygen installed on this machine ;)
I like how the lgui library looks, so I am going to be tinkering with it the next few days.
From what I can see, the only two Allegro GUIs still alive is Eagle and Lgui, although Agui exists, and works just fine (I compiled it just now).
I am going to be asking questions, definitely. :)

Edit:
Installed Doxygen and GraphViz, ran the doc build and I have to say that the documentation looks fairly comprehensive (so far) - well done, Frank! :)
That will definitely go a long way.
It is apparent that you put a lot of effort into the documentation.
That's a rare thing (on Github)

Go to: