mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 21:21:06 +01:00 
			
		
		
		
	Added IMGUI_DISABLE_OBSOLETE_FUNCTIONS
This commit is contained in:
		| @@ -31,6 +31,9 @@ | |||||||
| //---- Don't implement help and test window functionality (ShowUserGuide()/ShowStyleEditor()/ShowTestWindow() methods will be empty) | //---- Don't implement help and test window functionality (ShowUserGuide()/ShowStyleEditor()/ShowTestWindow() methods will be empty) | ||||||
| //#define IMGUI_DISABLE_TEST_WINDOWS | //#define IMGUI_DISABLE_TEST_WINDOWS | ||||||
|  |  | ||||||
|  | //---- Don't define obsolete functions names | ||||||
|  | //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS | ||||||
|  |  | ||||||
| //---- Implement STB libraries in a namespace to avoid conflicts | //---- Implement STB libraries in a namespace to avoid conflicts | ||||||
| //#define IMGUI_STB_NAMESPACE     ImStb | //#define IMGUI_STB_NAMESPACE     ImStb | ||||||
|  |  | ||||||
|   | |||||||
| @@ -8940,6 +8940,7 @@ void    ImFontAtlas::Clear() | |||||||
|     ClearFonts(); |     ClearFonts(); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS | ||||||
| void ImGui::GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, const void** png_data, unsigned int* png_size) | void ImGui::GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, const void** png_data, unsigned int* png_size) | ||||||
| { | { | ||||||
|     printf("GetDefaultFontData() is obsoleted in ImGui 1.30.\n"); |     printf("GetDefaultFontData() is obsoleted in ImGui 1.30.\n"); | ||||||
| @@ -8950,6 +8951,7 @@ void ImGui::GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, co | |||||||
|     if (png_size) *png_size = 0; |     if (png_size) *png_size = 0; | ||||||
|     IM_ASSERT(false); |     IM_ASSERT(false); | ||||||
| } | } | ||||||
|  | #endif | ||||||
|  |  | ||||||
| void    ImFontAtlas::GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel) | void    ImFontAtlas::GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel) | ||||||
| { | { | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -387,6 +387,7 @@ namespace ImGui | |||||||
|     IMGUI_API void          SetInternalState(void* state, bool construct = false); |     IMGUI_API void          SetInternalState(void* state, bool construct = false); | ||||||
|  |  | ||||||
|     // Obsolete (will be removed) |     // Obsolete (will be removed) | ||||||
|  | #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS | ||||||
|     IMGUI_API void          GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, const void** png_data, unsigned int* png_size);   // OBSOLETE 1.30+ |     IMGUI_API void          GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, const void** png_data, unsigned int* png_size);   // OBSOLETE 1.30+ | ||||||
|     static inline void      OpenNextNode(bool open) { ImGui::SetNextTreeNodeOpened(open, 0); }  // OBSOLETE 1.34+ |     static inline void      OpenNextNode(bool open) { ImGui::SetNextTreeNodeOpened(open, 0); }  // OBSOLETE 1.34+ | ||||||
|     static inline bool      GetWindowIsFocused() { return ImGui::IsWindowFocused(); }   // OBSOLETE 1.36+ |     static inline bool      GetWindowIsFocused() { return ImGui::IsWindowFocused(); }   // OBSOLETE 1.36+ | ||||||
| @@ -395,6 +396,7 @@ namespace ImGui | |||||||
|     static inline bool      IsClipped(const ImVec2& size) { return !IsRectVisible(size); }   // OBSOLETE 1.38+ |     static inline bool      IsClipped(const ImVec2& size) { return !IsRectVisible(size); }   // OBSOLETE 1.38+ | ||||||
|     static inline bool      IsRectClipped(const ImVec2& size) { return !IsRectVisible(size); }   // OBSOLETE 1.39+ |     static inline bool      IsRectClipped(const ImVec2& size) { return !IsRectVisible(size); }   // OBSOLETE 1.39+ | ||||||
|     static inline bool      IsMouseHoveringBox(const ImVec2& rect_min, const ImVec2& rect_max) { return IsMouseHoveringRect(rect_min, rect_max); }  // OBSOLETE 1.36+ |     static inline bool      IsMouseHoveringBox(const ImVec2& rect_min, const ImVec2& rect_max) { return IsMouseHoveringRect(rect_min, rect_max); }  // OBSOLETE 1.36+ | ||||||
|  | #endif | ||||||
|  |  | ||||||
| } // namespace ImGui | } // namespace ImGui | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user