1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-30 20:53:52 +00:00

Pass hover parameter to HeaderExtraContents().

This commit is contained in:
Bartosz Taudul 2022-09-03 19:36:01 +02:00
parent 6e36469840
commit 6abce4e0c9
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
4 changed files with 4 additions and 4 deletions

View File

@ -94,7 +94,7 @@ void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2
DrawContents( pxns, offset, wpos, hover, yMin, yMax ); DrawContents( pxns, offset, wpos, hover, yMin, yMax );
if( drawHeader ) if( drawHeader )
{ {
HeaderExtraContents( hdrOffset, wpos, labelWidth ); HeaderExtraContents( hdrOffset, wpos, labelWidth, hover );
} }
} }

View File

@ -31,7 +31,7 @@ protected:
virtual const char* HeaderLabel() const = 0; virtual const char* HeaderLabel() const = 0;
virtual void HeaderTooltip( const char* label ) const {}; virtual void HeaderTooltip( const char* label ) const {};
virtual void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth ) {}; virtual void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, bool hover ) {};
virtual int64_t RangeBegin() const = 0; virtual int64_t RangeBegin() const = 0;
virtual int64_t RangeEnd() const = 0; virtual int64_t RangeEnd() const = 0;

View File

@ -81,7 +81,7 @@ void TimelineItemPlot::HeaderTooltip( const char* label ) const
ImGui::EndTooltip(); ImGui::EndTooltip();
} }
void TimelineItemPlot::HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth ) void TimelineItemPlot::HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, bool hover )
{ {
auto draw = ImGui::GetWindowDrawList(); auto draw = ImGui::GetWindowDrawList();
const auto ty = ImGui::GetTextLineHeight(); const auto ty = ImGui::GetTextLineHeight();

View File

@ -25,7 +25,7 @@ protected:
int64_t RangeEnd() const override; int64_t RangeEnd() const override;
void HeaderTooltip( const char* label ) const override; void HeaderTooltip( const char* label ) const override;
void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth ) override; void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, bool hover ) override;
private: private:
PlotData* m_plot; PlotData* m_plot;