Page 1 of 1

Luigi

Posted: Thu Mar 02, 2023 6:14 pm
by AntonyOakenfull
Hello,

I would like to know is there anyway to include love2d code like : love.graphics.circle("fill", 300, 300, 50, 100) within the panels of Luigi.

Thank you for helping.

Antony

Re: Luigi

Posted: Thu Mar 02, 2023 7:17 pm
by BrotSagtMist
You need to actually tell us what this luigi thing is to begin with.

Re: Luigi

Posted: Thu Mar 02, 2023 7:45 pm
by pgimeno
I presume it's airstruck's awesome (but unfinished) UI lib. Unfortunately airstruck is no longer around to reply.

Luigi has a difference over other UI libs: it supports two backends, love and plain SDL.

https://github.com/airstruck/luigi

Re: Luigi

Posted: Thu Mar 02, 2023 8:25 pm
by AntonyOakenfull
Hi,
Yes it is the one made by Airstruck. Can anyone suggest any other UI that comes close to this one, as I did not know it was unfinished and maybe it can't do what I need it to do.

Re: Luigi

Posted: Thu Mar 02, 2023 8:36 pm
by BrotSagtMist
This may look awesome because of the default theme mimicing some quality program.
But there isnt much functionality at all shown, plus this thing draws 100% cpu constantly.

Re: Luigi

Posted: Thu Mar 02, 2023 8:57 pm
by AntonyOakenfull
Got it.
Looks like I will have to do it myself then. Any good tutorials to look at?

Re: Luigi

Posted: Thu Mar 02, 2023 9:16 pm
by BrotSagtMist
depends, how should it look like in the end, whats its purpose?

For games i just combine callback and drawing so that button("bub",10,10) not only draws "bub" but also checks if the mouse is pressed in that area and then return true or false. Thats good enough for showing in game buttons and its quite easy to pull off.
For real guis you would have to look at love.run and edit the whole workflow so that it does not redraw everything 60 times per second. No one needs an FPS based button window. That being said, skipping redraws when not needed push löve down to almost 0% cpu usage. None of the toolkits on this site account for this so far i can tell, but it is very well possible.

Re: Luigi

Posted: Thu Mar 02, 2023 9:30 pm
by AntonyOakenfull
I need a ui that is resizable, more like a app in windows 10, than just the whole ui resize up and down. I know this will be hard to do, but I am going to give it a try.

Re: Luigi

Posted: Thu Mar 02, 2023 9:36 pm
by BrotSagtMist
On mine i just work with % in everything.
So a box is placed on say .5,.5 and spans to .9,.9 so its staying in the center in every situation (plus a border).
The only downside is that it looks weird if you say switch to vertical monitors.