ImGui LÖVE module

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Fenrir
Party member
Posts: 222
Joined: Wed Nov 27, 2013 9:44 am
Contact:

Re: ImGui löve module

Post by Fenrir »

OK guys I've made a new release with Image and ImageButton widgets support! You just need to pass a LOVE Texture object to it (so an Image or a Canvas):

Image

Code: Select all

require "imgui"

local image = love.graphics.newImage("test.png")

function love.update(dt)
    imgui.NewFrame()
end

function love.draw()
    love.graphics.clear(100, 100, 100, 255)

    imgui.Image(image, 400, 225)
    imgui.Render()
end

...
So now the bindings are quite complete I think for most usages, the only feature I would like to add is support for custom fonts, but it can definitely wait.

As always I've made pre-built binaries for Windows (32bit) and Linux, and a MacOSX version is still welcome if possible (I should soon get a Mac so it won't be a problem anymore).
User avatar
Jack5500
Party member
Posts: 148
Joined: Wed Dec 07, 2011 8:38 pm
Location: Hamburg, Germany

Re: ImGui löve module

Post by Jack5500 »

Great! Thanks a lot!
User avatar
AnRu
Citizen
Posts: 69
Joined: Sun Oct 27, 2013 1:33 pm
Contact:

Re: ImGui löve module

Post by AnRu »

Hi, i already have troubles with setting dock layout for panels. How to set panel DockStyle or something like this?
User avatar
Ortimh
Citizen
Posts: 90
Joined: Tue Sep 09, 2014 5:07 am
Location: Indonesia

Re: ImGui löve module

Post by Ortimh »

Wooho! Thanks a lot! Thanks for the support. And yeah, now it needs custom fonts, but as you say it can wait. Great job!
User avatar
Fenrir
Party member
Posts: 222
Joined: Wed Nov 27, 2013 9:44 am
Contact:

Re: ImGui löve module

Post by Fenrir »

AnRu wrote:Hi, i already have troubles with setting dock layout for panels. How to set panel DockStyle or something like this?
Not sure what you're looking for but you can probably control the docks style with the PushStyleColor/PopStyleColor and PushStyleVar/PopStyleVar functions.
User avatar
AnRu
Citizen
Posts: 69
Joined: Sun Oct 27, 2013 1:33 pm
Contact:

Re: ImGui löve module

Post by AnRu »

Fenrir wrote:
AnRu wrote:Hi, i already have troubles with setting dock layout for panels. How to set panel DockStyle or something like this?
Not sure what you're looking for but you can probably control the docks style with the PushStyleColor/PopStyleColor and PushStyleVar/PopStyleVar functions.
I mean dock placement, like Left, Top, RIght and Bottom :)
User avatar
Fenrir
Party member
Posts: 222
Joined: Wed Nov 27, 2013 9:44 am
Contact:

Re: ImGui löve module

Post by Fenrir »

AnRu wrote:
Fenrir wrote:
AnRu wrote:Hi, i already have troubles with setting dock layout for panels. How to set panel DockStyle or something like this?
Not sure what you're looking for but you can probably control the docks style with the PushStyleColor/PopStyleColor and PushStyleVar/PopStyleVar functions.
I mean dock placement, like Left, Top, RIght and Bottom :)
You have a imgui.SetNextDock for that:
https://github.com/slages/love-imgui/bl ... gui_dock.h

The ImGuiDockSlot enum is binded to "Left", "Right", "Top", "Bottom", etc...

For instance:

Code: Select all

imgui.SetNextDock("Float")
imgui.BeginDock("MyDock")
...
imgui.EndDock()
User avatar
AnRu
Citizen
Posts: 69
Joined: Sun Oct 27, 2013 1:33 pm
Contact:

Re: ImGui löve module

Post by AnRu »

Fenrir wrote:
AnRu wrote:
Fenrir wrote:
Not sure what you're looking for but you can probably control the docks style with the PushStyleColor/PopStyleColor and PushStyleVar/PopStyleVar functions.
I mean dock placement, like Left, Top, RIght and Bottom :)
You have a imgui.SetNextDock for that:
https://github.com/slages/love-imgui/bl ... gui_dock.h

The ImGuiDockSlot enum is binded to "Left", "Right", "Top", "Bottom", etc...

For instance:

Code: Select all

imgui.SetNextDock("Float")
imgui.BeginDock("MyDock")
...
imgui.EndDock()
Thank you, I just didn't understand how enums are binded before
that :)
User avatar
Fenrir
Party member
Posts: 222
Joined: Wed Nov 27, 2013 9:44 am
Contact:

Re: ImGui löve module

Post by Fenrir »

AnRu wrote: Thank you, I just didn't understand how enums are binded before
that :)
Yep all enums are binded to their simple name without their type:
ImGuiWindowFlags_NoTitleBar => "NoTitleBar"
ImGuiCol_PlotLines => "PlotLines"
ImGuiDockSlot_Tab => "Tab"
...

You can find the full list at the end of this file:
https://github.com/slages/love-imgui/bl ... i_impl.cpp

Apart from that I can't stop anymore doing new debug windows for the game :)

Image
User avatar
AnRu
Citizen
Posts: 69
Joined: Sun Oct 27, 2013 1:33 pm
Contact:

Re: ImGui löve module

Post by AnRu »

Fenrir wrote:
AnRu wrote: Thank you, I just didn't understand how enums are binded before
that :)
Yep all enums are binded to their simple name without their type:
ImGuiWindowFlags_NoTitleBar => "NoTitleBar"
ImGuiCol_PlotLines => "PlotLines"
ImGuiDockSlot_Tab => "Tab"
...

You can find the full list at the end of this file:
https://github.com/slages/love-imgui/bl ... i_impl.cpp

Apart from that I can't stop anymore doing new debug windows for the game :)

Image
Hey, can you please make an extra big example love file with most of usable features?
It's very difficult for someone to use as documentation from C++ headers, someone really don't know C++.
And big amount of examples will help to understand exactly Lua syntax for creating GUI
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 6 guests