mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Display zone range popup area.
This commit is contained in:
parent
321fa06a3d
commit
bd51add4f1
@ -799,6 +799,7 @@ bool View::DrawImpl()
|
|||||||
}
|
}
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
|
m_setRangePopupOpen = ImGui::IsPopupOpen( "SetZoneRange" );
|
||||||
|
|
||||||
if( m_zoomAnim.active )
|
if( m_zoomAnim.active )
|
||||||
{
|
{
|
||||||
@ -3228,6 +3229,14 @@ void View::DrawZones()
|
|||||||
draw->AddLine( ImVec2( wpos.x + px1, linepos.y ), ImVec2( wpos.x + px1, linepos.y + lineh ), m_statRange.hiMax ? 0x998888EE : 0x338888EE, m_statRange.hiMax ? 2 : 1 );
|
draw->AddLine( ImVec2( wpos.x + px1, linepos.y ), ImVec2( wpos.x + px1, linepos.y + lineh ), m_statRange.hiMax ? 0x998888EE : 0x338888EE, m_statRange.hiMax ? 2 : 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( m_setRangePopup.active || m_setRangePopupOpen )
|
||||||
|
{
|
||||||
|
const auto s = std::min( m_setRangePopup.min, m_setRangePopup.max );
|
||||||
|
const auto e = std::max( m_setRangePopup.min, m_setRangePopup.max );
|
||||||
|
DrawStripedRect( draw, wpos.x + ( s - m_vd.zvStart ) * pxns, linepos.y, wpos.x + ( e - m_vd.zvStart ) * pxns, linepos.y + lineh, 5 * ImGui::GetTextLineHeight() / 15.f, 0x55DD8888 );
|
||||||
|
draw->AddRect( ImVec2( wpos.x + ( s - m_vd.zvStart ) * pxns, linepos.y ), ImVec2( wpos.x + ( e - m_vd.zvStart ) * pxns, linepos.y + lineh ), 0x77DD8888 );
|
||||||
|
}
|
||||||
|
|
||||||
if( m_highlight.active && m_highlight.start != m_highlight.end )
|
if( m_highlight.active && m_highlight.start != m_highlight.end )
|
||||||
{
|
{
|
||||||
const auto s = std::min( m_highlight.start, m_highlight.end );
|
const auto s = std::min( m_highlight.start, m_highlight.end );
|
||||||
|
@ -474,6 +474,7 @@ private:
|
|||||||
bool m_sourceRegexValid = true;
|
bool m_sourceRegexValid = true;
|
||||||
|
|
||||||
RangeSlim m_setRangePopup;
|
RangeSlim m_setRangePopup;
|
||||||
|
bool m_setRangePopupOpen = false;
|
||||||
|
|
||||||
struct FindZone {
|
struct FindZone {
|
||||||
enum : uint64_t { Unselected = std::numeric_limits<uint64_t>::max() - 1 };
|
enum : uint64_t { Unselected = std::numeric_limits<uint64_t>::max() - 1 };
|
||||||
|
Loading…
Reference in New Issue
Block a user