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

Method ImageButton

include/imgui/imgui_widgets.cpp:1208–1216  ·  view source on GitHub ↗

- ImageButton() adds style.FramePadding*2.0f to provided size. This is in order to facilitate fitting an image in a button. - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. (#8165) // FIXME: Maybe that's not the best design?

Source from the content-addressed store, hash-verified

1206// - ImageButton() adds style.FramePadding*2.0f to provided size. This is in order to facilitate fitting an image in a button.
1207// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. (#8165) // FIXME: Maybe that's not the best design?
1208bool ImGui::ImageButton(const char* str_id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col)
1209{
1210 ImGuiContext& g = *GImGui;
1211 ImGuiWindow* window = g.CurrentWindow;
1212 if (window->SkipItems)
1213 return false;
1214
1215 return ImageButtonEx(window->GetID(str_id), tex_ref, image_size, uv0, uv1, bg_col, tint_col);
1216}
1217
1218#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1219// Legacy API obsoleted in 1.89. Two differences with new ImageButton()

Callers

nothing calls this directly

Calls 1

GetIDMethod · 0.80

Tested by

no test coverage detected