mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Add context menus to ghost zones.
This commit is contained in:
parent
bd51add4f1
commit
67e86d2b27
@ -3708,6 +3708,7 @@ int View::DrawGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
|
||||
DrawZigZag( draw, wpos + ImVec2( 0, offset + ty/2 ), std::max( px0, -10.0 ), std::min( std::max( px1, px0+MinVisSize ), double( w + 10 ) ), ty/4, DarkenColor( color ) );
|
||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( std::max( px1, px0+MinVisSize ), double( w + 10 ) ), offset + ty ) ) )
|
||||
{
|
||||
if( IsMouseClickReleased( 1 ) ) m_setRangePopup = RangeSlim { ev.start.Val(), rend , true };
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::TextUnformatted( "Multiple ghost zones" );
|
||||
ImGui::Separator();
|
||||
@ -3765,6 +3766,7 @@ int View::DrawGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
|
||||
|
||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ) ) )
|
||||
{
|
||||
if( IsMouseClickReleased( 1 ) ) m_setRangePopup = RangeSlim { ev.start.Val(), ev.end.Val() , true };
|
||||
ImGui::BeginTooltip();
|
||||
TextDisabledUnformatted( ICON_FA_GHOST " Ghost zone" );
|
||||
ImGui::Separator();
|
||||
@ -3820,6 +3822,7 @@ int View::DrawGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
|
||||
|
||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ) ) )
|
||||
{
|
||||
if( IsMouseClickReleased( 1 ) ) m_setRangePopup = RangeSlim { ev.start.Val(), ev.end.Val(), true };
|
||||
ImGui::BeginTooltip();
|
||||
TextDisabledUnformatted( ICON_FA_GHOST " Ghost zone" );
|
||||
ImGui::Separator();
|
||||
|
Loading…
Reference in New Issue
Block a user