ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
61.11k stars 10.3k forks source link

No Hover Flags in ImGui::IsAnyItemHovered() #7571

Open Iacaka opened 6 months ago

Iacaka commented 6 months ago

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

ocornut commented 6 months ago

I don’t understand what you actually need. Please clarify.

Iacaka commented 6 months ago

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.

ruby3141 commented 6 months ago

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

Unfortunately I'm using imgui-rs and both approach seem impossible here. I'm not sure they're valid.

Iacaka commented 6 months ago

@ruby3141 I will try and send feedback as soon as i can. Thanks for the suggestions!