1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Move DrawHelpMarker to TracyImGui.hpp.

This commit is contained in:
Bartosz Taudul
2022-07-02 15:07:40 +02:00
parent 358148920a
commit c427214f46
3 changed files with 14 additions and 16 deletions
+14
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