mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Proper way to detect mouse hover over timeline.
This commit is contained in:
parent
86c2574848
commit
77e39700b1
@ -287,8 +287,8 @@ void View::DrawTimeline()
|
||||
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
|
||||
const auto h = std::max<float>( m_vd.zvHeight, ImGui::GetContentRegionAvail().y - 4 ); // magic border value
|
||||
|
||||
ImGui::InvisibleButton( "##zones", ImVec2( w, h ) );
|
||||
bool hover = ImGui::IsItemHovered();
|
||||
ImGui::ItemSize( ImVec2( w, h ) );
|
||||
bool hover = ImGui::IsWindowHovered() && ImGui::IsMouseHoveringRect( wpos, wpos + ImVec2( w, h ) );
|
||||
draw = ImGui::GetWindowDrawList();
|
||||
|
||||
const auto nspx = 1.0 / pxns;
|
||||
|
Loading…
Reference in New Issue
Block a user