Thanks @alloyed, that worked perfectlyalloyed wrote: ↑Tue Aug 15, 2017 12:32 amThis is in the one place in my code where I use this featuredan369 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.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.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()
ImGui LÖVE module
Re: ImGui LÖVE module
Re: ImGui LÖVE module
Does someone know how to add flags to textInputs, specifically the password flags for textInputs;
Which I turn into
Code: Select all
ImGui::InputText("password", bufpass, 64, ImGuiInputTextFlags_Password | ImGuiInputTextFlags_CharsNoBlank);
Code: Select all
imgui.inputText("password", passwordVar ... -- And the rest I don't know
Re: ImGui LÖVE module
You pass flags to Imgui by putting them as individual strings in a table and removing the part preceding the underscore. So in your case that would give :
Code: Select all
imgui.inputText("password", passwordVar, 64, {"Password", "CharsNoBlank"})
Re: ImGui LÖVE module
How do I set the WindowTitleAlign style? I'd like to persist the window title centering I have set here using the style editor:
I'm currently using PushStyleVar/PushStyleColor for all my styling (since GetStyle isn't available), but trying to set WindowTitleAlign using PushStyleVar_2 just hits the assert in imgui for when the style variable is of the wrong type.
I'm currently using PushStyleVar/PushStyleColor for all my styling (since GetStyle isn't available), but trying to set WindowTitleAlign using PushStyleVar_2 just hits the assert in imgui for when the style variable is of the wrong type.
Re: ImGui LÖVE module
Are there any Love 11.1 binaries out there? For some reason, I'm unable to finish the build process. Cloning and CMake work fine but nmake can't find a makefile and opening the project in VS spits out a lot of errors when trying to compile.
Re: ImGui LÖVE module
You're in luck! I just went through the whole process of getting it setup to build automatically on Windows, see if this works for you: https://github.com/camchenry/love-imgui ... ter-latest. It's currently just a Windows x86_64 only, no 32-bit support yet. I'll probably clean up what I have and submit a pull request to the original repo.
Re: ImGui LÖVE module
I'm making use of imgui.SetGlobalFontFromFileTTF("gfx/JAi.ttf", 14) which is working fine when running in ZeroBrane Studio. Sadly, as soon as I make an .exe file and run it, it ignores the font and uses the default one. How could I change this behaviour?
- ArchAngel075
- Party member
- Posts: 319
- Joined: Mon Jun 24, 2013 5:16 am
Re: ImGui LÖVE module
Having issues using DragDrop*** methods.
Consider the following code after a usual imgui.Begin() :
the methods
Did a search in src folder of github and found in here
the method is commented out along with "Unsupported return type const"
Is LOVE2D-imgui unable to support fully drag drop of items (not files externally) and/or is there some way i can detect the drop?
atm im considering setting a bool on Drag (since that happens) and checking if wasDragging on mouse release capturing mouse. then after targets doing
id prefer some more imgui method here.
Consider the following code after a usual imgui.Begin() :
Code: Select all
local active = imgui.Selectable("Test DropableItem");
if (imgui.BeginDragDropSource()) then
imgui.Text("dropping this")
-- imgui.SetDragDropPayload("Item", {item_id = "MyItem#ABCDEF-ABCDEF"})
imgui.EndDragDropSource()
end
local active = imgui.Selectable("Test Target");
local payload = imgui.BeginDragDropTarget();
if payload then
print("DropSource")
print(payload)
-- local payload = imgui.AcceptDragDropPayload("Item");
imgui.EndDragDropTarget()
end
- AcceptDragDropPayload
- SetDragDropPayload
Did a search in src folder of github and found in here
the method is commented out along with "Unsupported return type const"
Is LOVE2D-imgui unable to support fully drag drop of items (not files externally) and/or is there some way i can detect the drop?
atm im considering setting a bool on Drag (since that happens) and checking if wasDragging on mouse release capturing mouse. then after targets doing
Code: Select all
if isItemHovered() and _wasDragging then
--payload handling here
end
Re: ImGui LÖVE module
Had the same problem, did the same thing with setting a custom drag payload and checking whether the target area is hovered, it works but doesn't feel as good as using native ImGui's DragDrop* methods.
Who is online
Users browsing this forum: No registered users and 3 guests