Erf sorry for that, I changed something for the WIN32 part and totally missed to update it for the others, just try to comment this line and it should be OK. I've updated the git repo with these modifications if you want.Nixola wrote:I'm now getting this error (which I got before the one above, but somehow I didn't get it afterwards until now):Code: Select all
libraries/imgui/imgui_impl.cpp: In function ‘bool Init()’: libraries/imgui/imgui_impl.cpp:214:8: error: ‘window’ was not declared in this scope (void)window; ^~~~~~ libraries/imgui/imgui_impl.cpp:214:8: note: suggested alternative: In file included from libraries/imgui/imgui_impl.cpp:11:0: ./modules/window/Window.h:35:11: note: ‘love::window’ namespace window ^~~~~~
ImGui LÖVE module
Re: ImGui löve module
Re: ImGui löve module
OK I've made the modifications on how enums are handled, it now uses string as you suggested and it's a lot cleaner!
Here's an example:
So we can use a single string or a table of strings if we want to combine flags!
Next step will be to test on my side on Linux and then I'll make a try with the pull request to the love repo, but I need to go back to other tasks for now... I'll let you know how it goes!
Here's an example:
Code: Select all
imgui.SetNextWindowPos(50, 50, "FirstUseEver")
imgui.Begin("Another Window", true, { "AlwaysAutoResize", "NoTitleBar" })
Next step will be to test on my side on Linux and then I'll make a try with the pull request to the love repo, but I need to go back to other tasks for now... I'll let you know how it goes!
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: ImGui löve module
If someone has free time or wants to take on a project I propose the challenge of writing a GUI library that uses the very same API as ImGui but is Lua/LÖVE only, instead of working with a separate backend in C/C++ it would be directly embeded in LÖVE.
The API of ImGui is really nice and so is the looks, so if someone did this then it would be a pretty big achievment! Dropping a dependency on a binary library and providing a great UI library in pure Lua would be awesome.
I'm against putting this inside of LÖVE, I think it's a really high level stuff, and I don't think it fits LÖVE's politics of doing just what is needed. Also there aren't that many UI heavy games mades for LÖVE and adding a pointless dependency for such projects is well pointless... Also I think that UI can already be done with Lua and LÖVE, that is why I proposed the challenge. Currently I'm on a BIG project so can't tackle it sorry
The API of ImGui is really nice and so is the looks, so if someone did this then it would be a pretty big achievment! Dropping a dependency on a binary library and providing a great UI library in pure Lua would be awesome.
I'm against putting this inside of LÖVE, I think it's a really high level stuff, and I don't think it fits LÖVE's politics of doing just what is needed. Also there aren't that many UI heavy games mades for LÖVE and adding a pointless dependency for such projects is well pointless... Also I think that UI can already be done with Lua and LÖVE, that is why I proposed the challenge. Currently I'm on a BIG project so can't tackle it sorry
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: ImGui löve module
Well, I'm all for integrating a "proper" GUI library like ImGui into Löve. I think it's an area where Löve is really lacking. Sure you can roll your own for simple stuff, but what's the point of reinventing the wheel if you want to have more complex controls? A game framework should assist you with the repetitve work, just like it provides you a physics solution to work with so you don't have to roll your own. And as for the dependency: ImGui is small and self-contained (from my understanding) and is properly long-term supported by funding via patreon. So that shouldn't be a real problem.
Re: ImGui löve module
Just tested on Linux and it's building and working without problems with the version currently in the git repo:
I won't be able to test on other platforms as they are not available to me, but I can probably make a pull request with this initial version and see how it's received.
Next improvements would be to add bindings for image widgets and custom fonts support, but I'll definitely won't have time for it, so I'll rely on contributions for these.
I won't be able to test on other platforms as they are not available to me, but I can probably make a pull request with this initial version and see how it's received.
Next improvements would be to add bindings for image widgets and custom fonts support, but I'll definitely won't have time for it, so I'll rely on contributions for these.
Re: ImGui löve module
Hey guys,
So I made my try with the pull request and well, the bad news is that an UI module is out of LÖVE scope for an integration. But the good news is that I was totally unaware that it was possible to create binary modules loaded at runtime by the engine. So I updated the project to make it totally independent from LÖVE sources, there's no need anymore of a modified LÖVE version, it should work with the latest release or a nightly build.
I've updated the github project and added pre-build versions in the release section, so to test it you just need to copy the module (.dll or .so) in your executable folder or the LÖVE application folder (for instance "C:\Users\<user>\AppData\Roaming\LOVE" on Windows or ~/.local/shared/love on Linux), and just "require imgui" to get it loaded and ready to use.
If by any chance someone would be able to provide me with a MacOSX version, I would appreciate a lot!
EDIT: I've just updated it to be able to load the module from the LÖVE executable folder too, not just the application data folder.
EDIT2: And yes I just tested and it works with the 0.10.1 release.
So I made my try with the pull request and well, the bad news is that an UI module is out of LÖVE scope for an integration. But the good news is that I was totally unaware that it was possible to create binary modules loaded at runtime by the engine. So I updated the project to make it totally independent from LÖVE sources, there's no need anymore of a modified LÖVE version, it should work with the latest release or a nightly build.
I've updated the github project and added pre-build versions in the release section, so to test it you just need to copy the module (.dll or .so) in your executable folder or the LÖVE application folder (for instance "C:\Users\<user>\AppData\Roaming\LOVE" on Windows or ~/.local/shared/love on Linux), and just "require imgui" to get it loaded and ready to use.
If by any chance someone would be able to provide me with a MacOSX version, I would appreciate a lot!
EDIT: I've just updated it to be able to load the module from the LÖVE executable folder too, not just the application data folder.
EDIT2: And yes I just tested and it works with the 0.10.1 release.
Last edited by Fenrir on Mon Jul 25, 2016 11:28 am, edited 3 times in total.
Re: ImGui löve module
Honestly, I was wondering why you didn't do that earlier. That's some good news!
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
I totally missed this feature... I thought that the only way of loading a binary module was through ffi but there's a proper plugin system implemented into love.filesystem.Nixola wrote:Honestly, I was wondering why you didn't do that earlier. That's some good news!
Re: ImGui löve module
Is that plugin system documented anywhere? Is there any reason the usual thing won't work instead (put a "foo.so" or "foo.dll" somewhere in require path with a "luaopen_foo" entrypoint function)?Fenrir wrote:but there's a proper plugin system implemented into love.filesystem.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: ImGui löve module
That is totally what he means. This "plugin system" he mentions is just the Lua standard way of requiring binary libraries.
Though most probably he was doing this statically and now he can do it dynamically that is why it was necessary to modify LÖVE in the first place and now a dll is needed.
Though most probably he was doing this statically and now he can do it dynamically that is why it was necessary to modify LÖVE in the first place and now a dll is needed.
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Who is online
Users browsing this forum: No registered users and 4 guests