mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-10-26 12:27:30 +00: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:
		| @@ -43,7 +43,10 @@ Breaking Changes: | ||||
|   - ImGui::IsAnyWindowHovered()                 -> use ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow) | ||||
|   - ImGuiStyleVar_Count_                        -> use ImGuiStyleVar_COUNT | ||||
|   - ImGuiMouseCursor_Count_                     -> use ImGuiMouseCursor_COUNT | ||||
|   If you were still using the old names, while you are cleaning up, considering enabling | ||||
| - Removed redirecting functions/enums names that were marked obsolete in 1.61 (May 2018): | ||||
|   - InputFloat (... int decimal_precision ...)  -> use InputFloat (... const char* format ...) with format = "%.Xf" where X was value for decimal_precision. | ||||
|   - same for InputFloat2()/InputFloat3()/InputFloat4() variants taking a `int decimal_precision` parameter. | ||||
| - If you were still using the old names, while you are cleaning up, considering enabling | ||||
|   IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h even temporarily to have a pass at finding | ||||
|   and removing up old API calls, if any remaining. | ||||
|  | ||||
|   | ||||
| @@ -377,6 +377,9 @@ CODE | ||||
|                         - ImGui::IsAnyWindowHovered()         -> use ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow) | ||||
|                         - ImGuiStyleVar_Count_                -> use ImGuiStyleVar_COUNT | ||||
|                         - ImGuiMouseCursor_Count_             -> use ImGuiMouseCursor_COUNT | ||||
|                       - removed redirecting functions names that were marked obsolete in 1.61 (May 2018): | ||||
|                         - InputFloat (... int decimal_precision ...) -> use InputFloat (... const char* format ...) with format = "%.Xf" where X is your value for decimal_precision. | ||||
|                         - same for InputFloat2()/InputFloat3()/InputFloat4() variants taking a `int decimal_precision` parameter. | ||||
|  - 2020/10/05 (1.79) - removed ImGuiListClipper: Renamed constructor parameters which created an ambiguous alternative to using the ImGuiListClipper::Begin() function, with misleading edge cases (note: imgui_memory_editor <0.40 from imgui_club/ used this old clipper API. Update your copy if needed). | ||||
|  - 2020/09/25 (1.79) - renamed ImGuiSliderFlags_ClampOnInput to ImGuiSliderFlags_AlwaysClamp. Kept redirection enum (will obsolete sooner because previous name was added recently). | ||||
|  - 2020/09/25 (1.79) - renamed style.TabMinWidthForUnselectedCloseButton to style.TabMinWidthForCloseButton. | ||||
|   | ||||
							
								
								
									
										7
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -60,7 +60,7 @@ Index of this file: | ||||
| // Version | ||||
| // (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens) | ||||
| #define IMGUI_VERSION               "1.80 WIP" | ||||
| #define IMGUI_VERSION_NUM           17903 | ||||
| #define IMGUI_VERSION_NUM           17904 | ||||
| #define IMGUI_CHECKVERSION()        ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) | ||||
|  | ||||
| // Define attributes of all API symbols declarations (e.g. for DLL under Windows) | ||||
| @@ -1732,11 +1732,6 @@ namespace ImGui | ||||
|     static inline void  SetScrollHere(float center_ratio=0.5f){ SetScrollHereY(center_ratio); } | ||||
|     // OBSOLETED in 1.63 (between Aug 2018 and Sept 2018) | ||||
|     static inline bool  IsItemDeactivatedAfterChange()        { return IsItemDeactivatedAfterEdit(); } | ||||
|     // OBSOLETED in 1.61 (between Apr 2018 and Aug 2018) | ||||
|     IMGUI_API bool      InputFloat(const char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags flags = 0); // Use the 'const char* format' version instead of 'decimal_precision'! | ||||
|     IMGUI_API bool      InputFloat2(const char* label, float v[2], int decimal_precision, ImGuiInputTextFlags flags = 0); | ||||
|     IMGUI_API bool      InputFloat3(const char* label, float v[3], int decimal_precision, ImGuiInputTextFlags flags = 0); | ||||
|     IMGUI_API bool      InputFloat4(const char* label, float v[4], int decimal_precision, ImGuiInputTextFlags flags = 0); | ||||
| } | ||||
| typedef ImGuiInputTextCallback      ImGuiTextEditCallback;    // OBSOLETED in 1.63 (from Aug 2018): made the names consistent | ||||
| typedef ImGuiInputTextCallbackData  ImGuiTextEditCallbackData; | ||||
|   | ||||
| @@ -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
	 ocornut
					ocornut