mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Push pxns to HeaderExtraContents().
This commit is contained in:
parent
3ee928a7d1
commit
840709fe46
@ -75,7 +75,7 @@ void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2
|
|||||||
if( m_showFull )
|
if( m_showFull )
|
||||||
{
|
{
|
||||||
DrawLine( draw, dpos + ImVec2( 0, hdrOffset + ty - 1 ), dpos + ImVec2( w, hdrOffset + ty - 1 ), HeaderLineColor() );
|
DrawLine( draw, dpos + ImVec2( 0, hdrOffset + ty - 1 ), dpos + ImVec2( w, hdrOffset + ty - 1 ), HeaderLineColor() );
|
||||||
HeaderExtraContents( hdrOffset, wpos, labelWidth, hover );
|
HeaderExtraContents( hdrOffset, wpos, labelWidth, pxns, hover );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( 0, hdrOffset ), wpos + ImVec2( ty + labelWidth, hdrOffset + ty ) ) )
|
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( 0, hdrOffset ), wpos + ImVec2( ty + labelWidth, hdrOffset + ty ) ) )
|
||||||
|
@ -32,7 +32,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, bool hover ) {};
|
virtual void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, 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;
|
||||||
|
@ -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, bool hover )
|
void TimelineItemPlot::HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, bool hover )
|
||||||
{
|
{
|
||||||
auto draw = ImGui::GetWindowDrawList();
|
auto draw = ImGui::GetWindowDrawList();
|
||||||
const auto ty = ImGui::GetTextLineHeight();
|
const auto ty = ImGui::GetTextLineHeight();
|
||||||
|
@ -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, bool hover ) override;
|
void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, bool hover ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PlotData* m_plot;
|
PlotData* m_plot;
|
||||||
|
Loading…
Reference in New Issue
Block a user