Open Iacaka opened 6 months ago
I don’t understand what you actually need. Please clarify.
Oh. Sorry, i got something mixed up with the Button flags. It is entirely my fault. I just want ImGui::IsAnyItemHovered() to execute once for the whole duration that the item is hovered on.
I want a certain sound to play when any item is hovered on and it needs to be executed only once.
I think you want to give user a audible signal when hovered item is "changed to something(except nothing)",\ like tingling menu sound of quake 3 or something.
In my opinion, you should either
ImGui::GetHoveredID()
and play sound when it changes to non-zero value, orHoveredIdTimer
is 0.0f when ImGui::IsAnyItemHovered()
is true.Unfortunately I'm using imgui-rs and both approach seem impossible here. I'm not sure they're valid.
@ruby3141 I will try and send feedback as soon as i can. Thanks for the suggestions!
Version/Branch of Dear ImGui:
Version 1.94, Branch: docking
Back-ends:
imgui_impl_vulk.cpp + imgui_impl_glfw.cpp + custom vulk backend
Compiler, OS:
Windows 10
Full config/build information:
No response
Details:
I see no flags in the function for any item to be hovered. I have a issue with the sound engine where i want it to play only once if any item was hovered, but it repeatedly changes true/false. I thought i could use flags for the issue, but there are no ImGui_HoveredFlags in the function arguments. Maybe something to look forward to?
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response