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

Method ImageButton

include/imgui/imgui_widgets.cpp:1205–1213  ·  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

1203// - ImageButton() adds style.FramePadding*2.0f to provided size. This is in order to facilitate fitting an image in a button.
1204// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. (#8165) // FIXME: Maybe that's not the best design?
1205bool 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)
1206{
1207 ImGuiContext& g = *GImGui;
1208 ImGuiWindow* window = g.CurrentWindow;
1209 if (window->SkipItems)
1210 return false;
1211
1212 return ImageButtonEx(window->GetID(str_id), tex_ref, image_size, uv0, uv1, bg_col, tint_col);
1213}
1214
1215#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1216// 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