-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented hovered state / use window events instead of global functions to query mouse state #261
Conversation
Nightmare82
commented
Nov 13, 2023
- added hovered state
- use event queue instead of querying the mouse position to determine mouse/tap states
- allow scroll wheel events for hovered windows
- Initialize windowHasFocus correctly
- Remove mousePressed / touchDown states
Could you expand on why you've done these changes, the PR description doesn't go into enough depth. |
Sure:
|
Do all three of these issues need to be solved in the same PR? Is it possible to extract these things into separate PRs where we can see each change in isolation or is it required that all three fixes land at once? |
I think I could split it into two steps, the mouse wheel change could be done in a follow up PR(but would require the base of this PR) |
In my opinion, finishing #227 would be better. If imgui-sfml will process all events that are thrown into it, this PR won't be needed, I think. |
Ok but who is working on that ? I was waiting for a fix but since it seemed to be stuck I used this branch to fix the main issues I had in my tool since this is a big problem of ImGui-Sfml, at least for tools like mine. I could try to do it as you suggested since this is partially done already in this PR(I think I would mostly need to remove the hovered state and the checks related to that) or do you think someone will finish the other PR soonish ? |
No one is working on this PR. You can probably make a new one in the same vein, since it should fix your problem (most likely). Imgui-sfml just needs to stop caring about whether the window is un focus or not. It should handle all the events that are passed to a particular window. It should be up to the user to determine which events need to be passed and which ones should not. (Though there might be some problems with multiple windows…) |
Yes I think it should solve my issues (as this PR does), the main difference is that I need to decide from outside which events are sent to Imgui-Sfml. I agree that it sounds like the best solution since it allows users to add any custom rules easily. I will try to create a PR in the near future |