ImGui LÖVE module

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: ImGui LÖVE module

Post by SiENcE »

Nice thanks.
User avatar
DanielPower
Citizen
Posts: 50
Joined: Wed Apr 29, 2015 5:28 pm

Re: ImGui LÖVE module

Post by DanielPower »

I've written a file picker dialog using lfs and imgui. This was my first attempt at using imgui. The lack of documentation made it more difficult than it needed to be starting out, but once I got the hang of relating the C++ documentation to the Lua bindings, it went quite smoothly. I'm really happy with this module, thank you for taking the time to write it.

Image

It's up on Gitlab if anyone wants to use it. I will continue to work on it, as I'm using it in an animation editor I'm writing. Right now it only has an open dialog. The two major features I have planned are a save dialog, and thumbnail previews for images.

https://gitlab.com/danielpower/imgui-fi ... ree/master
User avatar
kbmonkey
Party member
Posts: 138
Joined: Tue Sep 01, 2015 12:19 pm
Location: Sydney
Contact:

Re: ImGui LÖVE module

Post by kbmonkey »

Are there any build instructions?

I did the cmake thing but can't see what file to use :)

Code: Select all

kbmonkey@multivac:love-imgui-0.8$ cmake .
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found LuaJIT: /usr/lib/x86_64-linux-gnu/libluajit-5.1.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kbmonkey/src/love-imgui-0.8
User avatar
DanielPower
Citizen
Posts: 50
Joined: Wed Apr 29, 2015 5:28 pm

Re: ImGui LÖVE module

Post by DanielPower »

kbmonkey wrote: Sat Aug 05, 2017 1:33 pm Are there any build instructions?
After running `cmake`, you need to run `make`.
This will generate `imgui.so` on Linux/Mac, and `imgui.dll` on Windows.
On Linux, place imgui.so in

Code: Select all

~/.local/share/love
On Windows, place imgui.dll in Program Files/LOVE
Not sure about Mac.
User avatar
kbmonkey
Party member
Posts: 138
Joined: Tue Sep 01, 2015 12:19 pm
Location: Sydney
Contact:

Re: ImGui LÖVE module

Post by kbmonkey »

DanielPower wrote: Sun Aug 06, 2017 5:40 pm After running `cmake`, you need to run `make`.
Thanks, that works a treat. This lib is great, love it!
User avatar
Mutos
Prole
Posts: 29
Joined: Sat Aug 05, 2017 7:05 am
Contact:

Re: ImGui LÖVE module

Post by Mutos »

Hi all,


Looking for a GUI to use with LÖVE2D, what's current status on this one ? Thanks in advance !
Benoît 'Mutos' Robin
Hoshikaze 2250, Sci-Fi universe in collaborative writing
User avatar
Fenrir
Party member
Posts: 222
Joined: Wed Nov 27, 2013 9:44 am
Contact:

Re: ImGui LÖVE module

Post by Fenrir »

Mutos wrote: Thu Aug 10, 2017 3:43 am Hi all,


Looking for a GUI to use with LÖVE2D, what's current status on this one ? Thanks in advance !
Well I would say that it works quite well and it's pretty stable and functional now. But be aware that it's a GUI mostly intended for tools/editors creation, not really for in-game elements. You can still tweak it for this purpose but it's clearly not its best usage.

And the biggest issue is still the lack of documentation, the best way to work with it is to have the imgui.h file opened and use it as your reference.
User avatar
Mutos
Prole
Posts: 29
Joined: Sat Aug 05, 2017 7:05 am
Contact:

Re: ImGui LÖVE module

Post by Mutos »

Hi Fenrir,


OK, thanks for the hints, I'll see to it, one of the things I wanna do is write a stellar systems editor, so it fits ^-^ If it's OK for making the game also, then I'll use it, alse I'll search for another GUI...
Benoît 'Mutos' Robin
Hoshikaze 2250, Sci-Fi universe in collaborative writing
dan369
Prole
Posts: 44
Joined: Tue Apr 15, 2014 10:53 pm

Re: ImGui LÖVE module

Post by dan369 »

Does anyone know how to capture the button press against the 'X' (i.e. to close the window)? I've been looking into the docs and see that p_open is the second parameter in imgui.Begin() but it when i click it in my code it doesn't seem to have any effect/change the boolean value.
alloyed
Citizen
Posts: 80
Joined: Thu May 28, 2015 8:45 pm
Contact:

Re: ImGui LÖVE module

Post by alloyed »

dan369 wrote: Mon Aug 14, 2017 6:19 pm Does anyone know how to capture the button press against the 'X' (i.e. to close the window)? I've been looking into the docs and see that p_open is the second parameter in imgui.Begin() but it when i click it in my code it doesn't seem to have any effect/change the boolean value.
This is in the one place in my code where I use this feature

Code: Select all

local isVisible, isOpen = imgui.Begin(windowID, true, flags)
if isOpen == false then
    -- don't run this block next time
end
imgui.End()
afaik this is an automatically generated change. The C++ api uses that second argument as a reference parameter, but those don't exist in lua so they get tacked on to the list of return arguments instead. This also applies to things like the text fields iirc.
Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests