mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Merge branch 'viewport' into docking
# Conflicts: # imgui_demo.cpp
This commit is contained in:
@ -2415,10 +2415,12 @@ bool ImGui::SliderFloat4(const char* label, float v[4], float v_min, float v_max
|
||||
return SliderScalarN(label, ImGuiDataType_Float, v, 4, &v_min, &v_max, format, power);
|
||||
}
|
||||
|
||||
bool ImGui::SliderAngle(const char* label, float* v_rad, float v_degrees_min, float v_degrees_max)
|
||||
bool ImGui::SliderAngle(const char* label, float* v_rad, float v_degrees_min, float v_degrees_max, const char* format)
|
||||
{
|
||||
if (format == NULL)
|
||||
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, "%.0f deg", 1.0f);
|
||||
bool value_changed = SliderFloat(label, &v_deg, v_degrees_min, v_degrees_max, format, 1.0f);
|
||||
*v_rad = v_deg * (2*IM_PI) / 360.0f;
|
||||
return value_changed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user