mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Removed redirecting functions/enums names that were marked obsolete in 1.61: InputFloat, InputFloat2, InputFloat3, InputFloat4 with int decimal_precision parameter. (#648, #712)
This commit is contained in:
@ -3363,41 +3363,6 @@ bool ImGui::InputFloat4(const char* label, float v[4], const char* format, ImGui
|
||||
return InputScalarN(label, ImGuiDataType_Float, v, 4, NULL, NULL, format, flags);
|
||||
}
|
||||
|
||||
// Prefer using "const char* format" directly, which is more flexible and consistent with other API.
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
bool ImGui::InputFloat(const char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags flags)
|
||||
{
|
||||
char format[16] = "%f";
|
||||
if (decimal_precision >= 0)
|
||||
ImFormatString(format, IM_ARRAYSIZE(format), "%%.%df", decimal_precision);
|
||||
return InputFloat(label, v, step, step_fast, format, flags);
|
||||
}
|
||||
|
||||
bool ImGui::InputFloat2(const char* label, float v[2], int decimal_precision, ImGuiInputTextFlags flags)
|
||||
{
|
||||
char format[16] = "%f";
|
||||
if (decimal_precision >= 0)
|
||||
ImFormatString(format, IM_ARRAYSIZE(format), "%%.%df", decimal_precision);
|
||||
return InputScalarN(label, ImGuiDataType_Float, v, 2, NULL, NULL, format, flags);
|
||||
}
|
||||
|
||||
bool ImGui::InputFloat3(const char* label, float v[3], int decimal_precision, ImGuiInputTextFlags flags)
|
||||
{
|
||||
char format[16] = "%f";
|
||||
if (decimal_precision >= 0)
|
||||
ImFormatString(format, IM_ARRAYSIZE(format), "%%.%df", decimal_precision);
|
||||
return InputScalarN(label, ImGuiDataType_Float, v, 3, NULL, NULL, format, flags);
|
||||
}
|
||||
|
||||
bool ImGui::InputFloat4(const char* label, float v[4], int decimal_precision, ImGuiInputTextFlags flags)
|
||||
{
|
||||
char format[16] = "%f";
|
||||
if (decimal_precision >= 0)
|
||||
ImFormatString(format, IM_ARRAYSIZE(format), "%%.%df", decimal_precision);
|
||||
return InputScalarN(label, ImGuiDataType_Float, v, 4, NULL, NULL, format, flags);
|
||||
}
|
||||
#endif // IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
|
||||
bool ImGui::InputInt(const char* label, int* v, int step, int step_fast, ImGuiInputTextFlags flags)
|
||||
{
|
||||
// Hexadecimal input provided as a convenience but the flag name is awkward. Typically you'd use InputText() to parse your own data, if you want to handle prefixes.
|
||||
|
Reference in New Issue
Block a user