mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 21:23:52 +00:00
Small toggle button.
This commit is contained in:
parent
bb39913339
commit
74e55f584c
@ -117,6 +117,16 @@ namespace tracy
|
|||||||
if( active ) ImGui::PopStyleColor( 3 );
|
if( active ) ImGui::PopStyleColor( 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SmallToggleButton( const char* label, bool& toggle )
|
||||||
|
{
|
||||||
|
const auto active = toggle;
|
||||||
|
if( active ) SetButtonHighlightColor();
|
||||||
|
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) );
|
||||||
|
if( ImGui::Button( label ) ) toggle = !toggle;
|
||||||
|
ImGui::PopStyleVar( 1 );
|
||||||
|
if( active ) ImGui::PopStyleColor( 3 );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user