Display zone range popup area.

This commit is contained in:
Bartosz Taudul 2020-08-04 16:49:39 +02:00
parent 321fa06a3d
commit bd51add4f1
2 changed files with 10 additions and 0 deletions

View File

@ -799,6 +799,7 @@ bool View::DrawImpl()
}
ImGui::EndPopup();
}
m_setRangePopupOpen = ImGui::IsPopupOpen( "SetZoneRange" );
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 );
}
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 )
{
const auto s = std::min( m_highlight.start, m_highlight.end );

View File

@ -474,6 +474,7 @@ private:
bool m_sourceRegexValid = true;
RangeSlim m_setRangePopup;
bool m_setRangePopupOpen = false;
struct FindZone {
enum : uint64_t { Unselected = std::numeric_limits<uint64_t>::max() - 1 };