slages / love-imgui

imgui module for the LÖVE game engine
MIT License
318 stars 61 forks source link

Broken docks on master #28

Open Eiyeron opened 6 years ago

Eiyeron commented 6 years ago

Hello, I wanted to make a prototype on Love 11.1 and it seems that docks are broken on the master branch. When using docks, nothing in them are visible. No text, button, image... I tested it both on windows and linux versions and nothing changed. One can see barely some garbage one frame or two after clicking on a dock's tab to bring focus on it, but nothing more.

The example code looks like this (don't take account of the deprecation warnings, they're caused by an old loverocks install) image

taylorh140 commented 5 years ago

It looks like the BeginDock function isn't properly returning a boolean. when I use a local

        for i = 1, 10 do
        local a = imgui.BeginDock("dock_"..i);
            if a then
                imgui.Text("Hello, dock "..i.."!");
                imgui.Text("Hello, dock "..a.."!");
            end
            print("Hello: "..a);
            imgui.EndDock()
        end

I get the error that i cannot concatenate a nil value 'a' which shouldn't happen given that the function should return a bool.

ericoporto commented 5 years ago

I have the same problem, was going crazy here. Couldn't figure out why the error happens.

flamendless commented 5 years ago

Same here. BeginDock doesnt return anything. Have anyone fixed this?

flamendless commented 5 years ago

Hi, ive fixed this dock issue in my fork

flamendless commented 5 years ago

Now the only issues are: