Move imgui extension function to an appropriate place.

This commit is contained in:
Bartosz Taudul 2019-06-03 01:35:32 +02:00
parent c433e76c7a
commit ff6768986e
2 changed files with 14 additions and 14 deletions

View File

@ -19,6 +19,20 @@ namespace tracy
ImGui::TextUnformatted( text ); ImGui::TextUnformatted( text );
} }
static inline void TextDisabledUnformatted( const char* begin, const char* end = nullptr )
{
ImGui::PushStyleColor( ImGuiCol_Text, GImGui->Style.Colors[ImGuiCol_TextDisabled] );
ImGui::TextUnformatted( begin, end );
ImGui::PopStyleColor();
}
static inline void TextFocused( const char* label, const char* value )
{
TextDisabledUnformatted( label );
ImGui::SameLine();
ImGui::TextUnformatted( value );
}
static inline void DrawWaitingDots( double time ) static inline void DrawWaitingDots( double time )
{ {
ImGui::TextUnformatted( "" ); ImGui::TextUnformatted( "" );

View File

@ -372,20 +372,6 @@ static const char* MemSizeToString( int64_t val )
return buf; return buf;
} }
static void TextDisabledUnformatted( const char* begin, const char* end = nullptr )
{
ImGui::PushStyleColor(ImGuiCol_Text, GImGui->Style.Colors[ImGuiCol_TextDisabled]);
ImGui::TextUnformatted( begin, end );
ImGui::PopStyleColor();
}
static void TextFocused( const char* label, const char* value )
{
TextDisabledUnformatted( label );
ImGui::SameLine();
ImGui::TextUnformatted( value );
}
static void SetButtonHighlightColor() static void SetButtonHighlightColor()
{ {
ImGui::PushStyleColor( ImGuiCol_Button, (ImVec4)ImColor::HSV( 0.35f, 0.6f, 0.6f ) ); ImGui::PushStyleColor( ImGuiCol_Button, (ImVec4)ImColor::HSV( 0.35f, 0.6f, 0.6f ) );