Open davideps opened 4 years ago
Hey David, this is definitely a problem I've had but hadn't quite gotten around to solving. I think the fundamental issue is that the ggez input system doesn't know about imgui, so probably some custom glue code needs to be written.
One idea might be to:
Hi, just stumbled on this issue and have an idea. We have the imgui wrapper function for each event, and the wrapper knows were each window is. So maybe if the mouse is under a imgui window, we could set a global variable inside of the imgui_wrapper. So now, after we pass the events to imgui, we could check if that boil is true, to proceed to ggez input logic. I could maybe help implementing this.
sounds promising @saucesaft, feel free to create a draft PR and we can discuss 😄
Hi Olivia,
In your setup, ggez passes mouse behavior to imgui to process or ignore as necessary. However, can you see any way for ggez to know whether the user is clicking in an imgui window so it knows whether to process or ignore the click? For example, selecting an item in the popup also registers a click with ggez. I think ggez would need to know the location and size of all imgui windows, right?
-david