mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-21 01:44:21 +00:00
Merge branch 'master' into docking
# Conflicts: # backends/imgui_impl_dx9.cpp # backends/imgui_impl_dx9.h # backends/imgui_impl_vulkan.cpp # imgui.cpp
This commit is contained in:
commit
ff2d6815ef
20 changed files with 269 additions and 153 deletions
|
|
@ -1079,8 +1079,6 @@ void ImGui::Image(ImTextureID user_texture_id, const ImVec2& image_size, const I
|
|||
window->DrawList->AddImage(user_texture_id, bb.Min + padding, bb.Max - padding, uv0, uv1, GetColorU32(tint_col));
|
||||
}
|
||||
|
||||
// ImageButton() is flawed as 'id' is always derived from 'texture_id' (see #2464 #1390)
|
||||
// We provide this internal helper to write your own variant while we figure out how to redesign the public ImageButton() API.
|
||||
bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
|
@ -1108,7 +1106,8 @@ bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& imag
|
|||
return pressed;
|
||||
}
|
||||
|
||||
// Note that ImageButton() adds style.FramePadding*2.0f to provided size. This is in order to facilitate fitting an image in a button.
|
||||
// - 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?
|
||||
bool ImGui::ImageButton(const char* str_id, ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
|
@ -3336,7 +3335,8 @@ bool ImGui::SliderAngle(const char* label, float* v_rad, float v_degrees_min, fl
|
|||
format = "%.0f deg";
|
||||
float v_deg = (*v_rad) * 360.0f / (2 * IM_PI);
|
||||
bool value_changed = SliderFloat(label, &v_deg, v_degrees_min, v_degrees_max, format, flags);
|
||||
*v_rad = v_deg * (2 * IM_PI) / 360.0f;
|
||||
if (value_changed)
|
||||
*v_rad = v_deg * (2 * IM_PI) / 360.0f;
|
||||
return value_changed;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue