mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-14 04:01:48 +00:00
Make timeline item visibility functions virtual.
This commit is contained in:
parent
135d3b7f30
commit
9c464e9f05
@ -20,7 +20,7 @@ TimelineItem::TimelineItem( View& view, Worker& worker )
|
|||||||
|
|
||||||
void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax )
|
void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax )
|
||||||
{
|
{
|
||||||
if( !m_visible )
|
if( !IsVisible() )
|
||||||
{
|
{
|
||||||
m_height = 0;
|
m_height = 0;
|
||||||
m_offset = 0;
|
m_offset = 0;
|
||||||
@ -109,7 +109,7 @@ void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2
|
|||||||
{
|
{
|
||||||
if( ImGui::MenuItem( ICON_FA_EYE_SLASH " Hide" ) )
|
if( ImGui::MenuItem( ICON_FA_EYE_SLASH " Hide" ) )
|
||||||
{
|
{
|
||||||
m_visible = false;
|
SetVisible( false );
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
}
|
}
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
|
@ -20,8 +20,8 @@ public:
|
|||||||
void Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax );
|
void Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax );
|
||||||
|
|
||||||
void VisibilityCheckbox();
|
void VisibilityCheckbox();
|
||||||
void SetVisible( bool visible ) { m_visible = visible; }
|
virtual void SetVisible( bool visible ) { m_visible = visible; }
|
||||||
bool IsVisible() const { return m_visible; }
|
virtual bool IsVisible() const { return m_visible; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual uint32_t HeaderColor() const = 0;
|
virtual uint32_t HeaderColor() const = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user