Add support for notification text in View.

This commit is contained in:
Bartosz Taudul 2019-01-06 19:14:24 +01:00
parent 980c54e349
commit 77c9a8c407
2 changed files with 9 additions and 0 deletions

View File

@ -689,6 +689,12 @@ bool View::DrawImpl()
#else #else
ImGui::Text( "View span: %-10s Time span: %-10s ", TimeToString( m_zvEnd - m_zvStart ), TimeToString( m_worker.GetLastTime() - m_worker.GetTimeBegin() ) ); ImGui::Text( "View span: %-10s Time span: %-10s ", TimeToString( m_zvEnd - m_zvStart ), TimeToString( m_worker.GetLastTime() - m_worker.GetTimeBegin() ) );
#endif #endif
if( m_notificationTime > 0 )
{
m_notificationTime -= io.DeltaTime;
ImGui::SameLine();
ImGui::TextDisabled( m_notificationText.c_str() );
}
DrawFrames(); DrawFrames();
DrawZones(); DrawZones();
ImGui::End(); ImGui::End();

View File

@ -283,6 +283,9 @@ private:
SetTitleCallback m_stcb; SetTitleCallback m_stcb;
bool m_titleSet = false; bool m_titleSet = false;
float m_notificationTime = 0;
std::string m_notificationText;
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 };
enum class GroupBy : int { Thread, UserText, Callstack }; enum class GroupBy : int { Thread, UserText, Callstack };