You'll never guess who my new favorite person is! (It's you. How about that.)
This totally rules and it's been something I've been dying for for a while but I wasn't skilled enough to even get it out of the gate.
I would totally be in favor of this shipping as an official love module, once all the kinda rough C parts are rounded off (like the global ImGuiSetCond_FirstUseEver leaking into lua-space). It could also use a bit more love-like API but it's still pretty rad that you got it this far.
ImGui LÖVE module
- EntranceJew
- Prole
- Posts: 31
- Joined: Fri Apr 03, 2015 10:02 pm
- Location: Saint Petersburg, Florida
- Contact:
Re: ImGui löve module
Sorry for hijacking the thread to promote my libraries, but SUIT is a pure Lua imgui library. ocornut's imgui lib offers way more widgets than SUIT does. However, most (all?) of the traditional widgets can be implemented using just a few the basic imgui building blocks: buttons, sliders, and inputs. You can even implement moveable, stackable windows with these.
-
- Prole
- Posts: 13
- Joined: Mon Apr 09, 2012 1:39 pm
Re: ImGui löve module
Ah, I love it. I'm a bit hesitant to use modified Love, though. Out of curiosity, have you submitted a pull request to Love devs? imgui is a stable, mature, simple, very efficient library, and I'd absolutely love to see it included in Love.
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: ImGui löve module
GUIs can be made a myriad ways.
Choosing one and stuffing it into Löve would go against its minimalistic framework-like design.
Don't take my word for it though.
Choosing one and stuffing it into Löve would go against its minimalistic framework-like design.
Don't take my word for it though.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: ImGui löve module
Hey guys,
Sorry I was off last week!
Apart from that I started to migrate my editor to it:
And it totally convinced me that it was the right thing to do, with a lot less code I'm able to do a lot more than with my previous solution, and it's working like a charm so far!
Sorry I was off last week!
Thanks a lot man for trying it! As soon as I can I'll boot on linux and try it on my side!alloyed wrote:So I tried compiling it as an external lib on Linux, my notes so far:
imgui needs a prerelease copy of love. Love 0.10.2 is missing a function or two.
Compiling as a separate library that links to liblove compiles fine, though I'm not sure if it can share state with the actual love game yet. Right now, it segfaults when trying to call filesystem functions, which at least suggests that maybe it's not been initialized.
There were a few things that looked like errors that I edited to get it to compile:
GetColorU32 is exported by imgui_iterator.cpp, even though its an inline. Commenting it out fixed the problem
OPTIONAL_LABEL_ARG expects 2 arguments but is only defined as having one. Just add an extra arg to fix
EDIT: Figured out what was wrong, it just turns out my version of love-hg was a little outdated. I'll publish my fork on github in a bit once I figure out how I want to deal with getting header files from love
Thanks for pointing it, I had a look at it before going for imgui but well, I was really looking for a library totally mature and fully featured to not make the same mistake than with LoveFrames. And I must admit than knowing personnally the imgui developper (he was one of my teachers at school) and knowing that he have support through patreon to continue to update and maintain the library makes me more confident than going again on a Lua based library without knowing if at some point it won't be dropped again.vrld wrote:Sorry for hijacking the thread to promote my libraries, but SUIT is a pure Lua imgui library. ocornut's imgui lib offers way more widgets than SUIT does. However, most (all?) of the traditional widgets can be implemented using just a few the basic imgui building blocks: buttons, sliders, and inputs. You can even implement moveable, stackable windows with these.
Thanks man, it's still not ready for an official pull request but I'll sure make one as soon as possible!asmageddon wrote:Ah, I love it. I'm a bit hesitant to use modified Love, though. Out of curiosity, have you submitted a pull request to Love devs? imgui is a stable, mature, simple, very efficient library, and I'd absolutely love to see it included in Love.
Well as I said imgui is a developper centric UI library, it won't suit for a game UI, but it can really help speed up a lot the development process, that's why I think it can really suit well into löve as a nice option for developpers to easily create tools for their games. And as lua-enet for instance it's totally optionnal, you can use a different option if you want.zorg wrote:GUIs can be made a myriad ways.
Choosing one and stuffing it into Löve would go against its minimalistic framework-like design.
Don't take my word for it though.
Apart from that I started to migrate my editor to it:
And it totally convinced me that it was the right thing to do, with a lot less code I'm able to do a lot more than with my previous solution, and it's working like a charm so far!
-
- Prole
- Posts: 13
- Joined: Mon Apr 09, 2012 1:39 pm
Re: ImGui löve module
As Fenrir said, imgui is very dev-centric - a lot can be built on top of it, and it's very flexible, while staying minimalistic. Its minimalist and lightweight nature are what makes me feel like it'd be a perfect fit for Love - if you want something fancier, you use a different lib, or build one on top of imgui. If you want something quick, or just really high performance, you go for imgui. I don't think it goes against love philosophy any more than including Box2D or enet does. It's a mature library that shouldn't add much maintenance overhead, I see few downsides to including it, and many upsides.
Re: ImGui löve module
OK I finished porting the in-game editor to imgui:
It was quite fast to make the move, and it confirmed that with a lot less code than my previous implementation using loveframes, I'm having a more featured and robust tool. And more importantly, it will be a lot more easier to make it evolve from now.
While implementing everything, I improved a bit the imgui löve module, and I also integrated the changes alloyed pointed me to make it build on Linux, so as soon as I can I'll make some further tests on it and then I think it will be ready for a pull request. I'll let you know how it goes!
It was quite fast to make the move, and it confirmed that with a lot less code than my previous implementation using loveframes, I'm having a more featured and robust tool. And more importantly, it will be a lot more easier to make it evolve from now.
While implementing everything, I improved a bit the imgui löve module, and I also integrated the changes alloyed pointed me to make it build on Linux, so as soon as I can I'll make some further tests on it and then I think it will be ready for a pull request. I'll let you know how it goes!
Re: ImGui löve module
Fenrir, would you put this LÖVE "mod" on Github? I'd like to try it, and that way everyone would be able to improve it
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: ImGui löve module
Yep that's part of the plan, as soon as I can I'll setup a github project!
Re: ImGui löve module
BTW, there's something I'm really not happy with, it's how imgui enums are handled, currently everything is exported using globals like:
Is there any way to do it more elegantly without poluting the application globals list?
Code: Select all
lua_pushnumber(L, ImGuiWindowFlags_NoTitleBar);
lua_setglobal(L, "ImGuiWindowFlags_NoTitleBar");
lua_pushnumber(L, ImGuiWindowFlags_NoResize);
lua_setglobal(L, "ImGuiWindowFlags_NoResize");
...
Who is online
Users browsing this forum: No registered users and 1 guest