MouseEntered doesn't work properly on MenuBar

Started by AlexxanderX, 02 February 2015, 16:03:35

AlexxanderX

I have this code line:m_menuBar->connect("MouseEntered", [&](){ std::cout << "ENTERED\n"; }); and it's working only one time and then nothing.

Could you add signal MousePressed to MenuBar?

texus

The MouseEntered signals where indeed broken in MenuBar and they will now be send correctly in the new version.

Why do you need a MousePressed signal?

AlexxanderX

Working on a map editor and when click on a widget the map editor from below also create a tile in that position. I have made a workaround using MousePressed for ChildWindows sending a funtion to the map to cancel the next tile and I also need this in MenuBar. But found another workaround using MouseEntered/MouseLeft, but I would be happy if you would add MousePressed signal for MenuBar.

texus

What you need to solve your real problem is to check the return value of the gui.handleEvent function. You can then determine to pass the event to your map editor or not.