Move DrawHelpMarker to TracyImGui.hpp.

This commit is contained in:
Bartosz Taudul 2022-07-02 15:07:40 +02:00
parent 358148920a
commit c427214f46
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
3 changed files with 14 additions and 16 deletions

View File

@ -267,6 +267,20 @@ static const ImVec4 SyntaxColorsDimmed[] = {
ImGui::EndTooltip();
}
[[maybe_unused]] void tracy_force_inline DrawHelpMarker( const char* desc )
{
TextDisabledUnformatted( "(?)" );
if( ImGui::IsItemHovered() )
{
const auto ty = ImGui::GetTextLineHeight();
ImGui::BeginTooltip();
ImGui::PushTextWrapPos( 450.0f * ty / 15.f );
ImGui::TextUnformatted( desc );
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}
}
}
#endif

View File

@ -250,20 +250,6 @@ bool View::ViewDispatch( const char* fileName, int line, uint64_t symAddr )
}
}
void View::DrawHelpMarker( const char* desc ) const
{
TextDisabledUnformatted( "(?)" );
if( ImGui::IsItemHovered() )
{
const auto ty = ImGui::GetTextLineHeight();
ImGui::BeginTooltip();
ImGui::PushTextWrapPos( 450.0f * ty / 15.f );
ImGui::TextUnformatted( desc );
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}
}
static const char* CompressionName[] = {
"LZ4",
"LZ4 HC",

View File

@ -183,8 +183,6 @@ private:
const char* ShortenNamespace( const char* name ) const;
void DrawHelpMarker( const char* desc ) const;
bool DrawImpl();
void DrawNotificationArea();
bool DrawConnection();