- 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?
| 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? |
| 1208 | bool 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() |