MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / SmallButton

Method SmallButton

include/imgui/imgui_widgets.cpp:832–840  ·  view source on GitHub ↗

Small buttons fits within text without additional vertical spacing.

Source from the content-addressed store, hash-verified

830
831// Small buttons fits within text without additional vertical spacing.
832bool ImGui::SmallButton(const char* label)
833{
834 ImGuiContext& g = *GImGui;
835 float backup_padding_y = g.Style.FramePadding.y;
836 g.Style.FramePadding.y = 0.0f;
837 bool pressed = ButtonEx(label, ImVec2(0, 0), ImGuiButtonFlags_AlignTextBaseLine);
838 g.Style.FramePadding.y = backup_padding_y;
839 return pressed;
840}
841
842// Tip: use ImGui::PushID()/PopID() to push indices or pointers in the ID stack.
843// Then you can keep 'str_id' empty or the same for all your buttons (instead of creating a string based on a non-string id)

Callers

nothing calls this directly

Calls 1

ImVec2Function · 0.85

Tested by

no test coverage detected