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

Add time limit ranges window.

This commit is contained in:
Bartosz Taudul
2020-07-31 16:37:47 +02:00
parent 9633617810
commit 8091207d26
3 changed files with 75 additions and 13 deletions
+19
View File
@@ -100,6 +100,25 @@ namespace tracy
}
}
static inline bool SmallButtonDisablable( const char* label, bool disabled )
{
if( disabled )
{
ImGui::PushStyleColor( ImGuiCol_Button, (ImVec4)ImColor( 0.3f, 0.3f, 0.3f, 1.0f ) );
ImGuiContext& g = *GImGui;
float backup_padding_y = g.Style.FramePadding.y;
g.Style.FramePadding.y = 0.0f;
ImGui::ButtonEx( label, ImVec2( 0, 0 ), ImGuiButtonFlags_Disabled | ImGuiButtonFlags_AlignTextBaseLine );
g.Style.FramePadding.y = backup_padding_y;
ImGui::PopStyleColor( 1 );
return false;
}
else
{
return ImGui::SmallButton( label );
}
}
static inline void DrawTextContrast( ImDrawList* draw, const ImVec2& pos, uint32_t color, const char* text )
{
draw->AddText( pos + ImVec2( 1, 1 ), 0xAA000000, text );