-
Notifications
You must be signed in to change notification settings - Fork 232
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
on-hover element #211
Comments
Check out how menu creates a popup when clicked: https://github.com/cycfi/elements/blob/master/lib/src/element/menu.cpp#L62-L99 You might use popup as-is, or take inspirations from it: https://github.com/cycfi/elements/blob/master/lib/src/element/popup.cpp |
BTW, looking how |
Adding some things not to forget - there are still 2 things that block from having a good tooltip that follows the mouse:
|
I don't know what you are doing, and I am not sure if the docs will give you the details that you need. You are questioning a fundamental design decision that's been in place for years, only with superficial knowledge. The examples clearly show that hovering works (the menu, hovering over check boxes and radio buttons, etc. use that mechanism). I will not "fix" something that is not broken.
I don't think the cursor member function is designed for what you are trying to do. If you want to follow the mouse fast, you're better off with a post handler at 60fps, that tracks the cursor and draws something directly, instead of going through the hierarchy. |
Windows? I am not getting that. You know the drill. File an issue with specific instructions on how to repro. I am not getting that. Regardless, you are confusing implementation and design. I am talking about design: "You are questioning a fundamental design decision that's been in place for years, only with superficial knowledge." You conveniently nit-picked a probably unrelated bug. |
Yes, on Windows. Move the mouse slowly; changing window position may also affect the highlight updating behavior (perhaps related to some floating point position roundings)
I'm questioning it because it's not documented. I have no idea how fundamental it is and what is intended and what is not. In your opinion - what is the correct approach to implement my desired behavior?
|
Still not getting it. I see no reason why it should be different on Windows, but I'll try tomorrow. You might also want to update develop since I committed some traversal fixes related to menus (but unrelated to hovering!).
"Questioning" is putting it mildly, actually. "I see no reason for not reporting these events for child elements." Is more like an unfounded statement, again based on superficial information.
Let me get back to you on this. |
So after 12bccf4 there is a tooltip elemenet, but it does not guuarantee that the tooltip will actually render on top of everything else. My use case: I'm creating a preview of a sort of a game UI mod, and need to display some items. From how the game works, flow composite which I use for item elements is not strictly appropriate but it's closer than other tiling methods (mentioning flow because I noticed small differences in behavior). Just like in the game, hovering over something displays its properties. Some hovers and other on-top-of effects are permanent, other follow the mouse. For some, I need a guuarantee that they will be the highest in Z axis (drawn latest). Because how the game UI works (it definitely has some layers) I think |
Are you going to provide instructions on how to repro this? As I said, I can't repro this. Can anyone else also repro this one? |
I tried again following this but I can't reproduce that result, though I'm not sure I understand how. When the mouse should be moved slowly? Changing window position means that the menu is no more visible and then something changes before showing it again? |
This thing is quite old, but I haven't reported it earlier. How do I repro: move the window, open menu, move cursor slowly between options. |
Does not repro, no matter how hard I try. You might want to try it again if that issue is "old". Is that is an old screenshot as well? Try again with the latest develop and the cursor-handling-overhaul branch. |
This isn't an old screen, it has been made on a very recent develop. Does not reproduce on |
As I mentioned above, my best guess is that this happened in the middle of some code changes with #216, first item: "Layout example: menu not processing up/down arrows correctly" I was working on recently (before dab3308). We can't repro it on latest develop. Anyway, the point is rather moot if the cursor-handling-overhaul` branch is good. |
This issue is labeled pending reply. I can no longer reproduce the highlight issue. If you are pending for my reply - then I think it can be closed. |
I would like to display some extra elements when user hovers over certain elements. There is already
floating
element which renders on top of everything else, but:The text was updated successfully, but these errors were encountered: