mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-10-26 12:27:30 +00:00 
			
		
		
		
	Remove trailing spaces
This commit is contained in:
		| @@ -26,10 +26,10 @@ | |||||||
| //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names. | //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names. | ||||||
| //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS | //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS | ||||||
|  |  | ||||||
| //---- Disable all of Dear ImGui or don't implement standard windows.  | //---- Disable all of Dear ImGui or don't implement standard windows. | ||||||
| // It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp. | // It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp. | ||||||
| //#define IMGUI_DISABLE                                     // Disable everything: all headers and source files will be empty.  | //#define IMGUI_DISABLE                                     // Disable everything: all headers and source files will be empty. | ||||||
| //#define IMGUI_DISABLE_DEMO_WINDOWS                        // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended.  | //#define IMGUI_DISABLE_DEMO_WINDOWS                        // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended. | ||||||
| //#define IMGUI_DISABLE_METRICS_WINDOW                      // Disable debug/metrics window: ShowMetricsWindow() will be empty. | //#define IMGUI_DISABLE_METRICS_WINDOW                      // Disable debug/metrics window: ShowMetricsWindow() will be empty. | ||||||
|  |  | ||||||
| //---- Don't implement some functions to reduce linkage requirements. | //---- Don't implement some functions to reduce linkage requirements. | ||||||
|   | |||||||
| @@ -4159,7 +4159,7 @@ void ImGui::Render() | |||||||
|     g.FrameCountRendered = g.FrameCount; |     g.FrameCountRendered = g.FrameCount; | ||||||
|     g.IO.MetricsRenderWindows = 0; |     g.IO.MetricsRenderWindows = 0; | ||||||
|     g.DrawDataBuilder.Clear(); |     g.DrawDataBuilder.Clear(); | ||||||
|      |  | ||||||
|     // Add background ImDrawList |     // Add background ImDrawList | ||||||
|     if (!g.BackgroundDrawList.VtxBuffer.empty()) |     if (!g.BackgroundDrawList.VtxBuffer.empty()) | ||||||
|         AddDrawListToDrawData(&g.DrawDataBuilder.Layers[0], &g.BackgroundDrawList); |         AddDrawListToDrawData(&g.DrawDataBuilder.Layers[0], &g.BackgroundDrawList); | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -1944,8 +1944,8 @@ struct ImDrawList | |||||||
|  |  | ||||||
|     // Primitives |     // Primitives | ||||||
|     // - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. |     // - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. | ||||||
|     // - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred).  |     // - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). | ||||||
|     //   In future versions we will use textures to provide cheaper and higher-quality circles.  |     //   In future versions we will use textures to provide cheaper and higher-quality circles. | ||||||
|     //   Use AddNgon() and AddNgonFilled() functions if you need to guaranteed a specific number of sides. |     //   Use AddNgon() and AddNgonFilled() functions if you need to guaranteed a specific number of sides. | ||||||
|     IMGUI_API void  AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f); |     IMGUI_API void  AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f); | ||||||
|     IMGUI_API void  AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All, float thickness = 1.0f);   // a: upper-left, b: lower-right (== upper-left + size), rounding_corners_flags: 4 bits corresponding to which corner to round |     IMGUI_API void  AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All, float thickness = 1.0f);   // a: upper-left, b: lower-right (== upper-left + size), rounding_corners_flags: 4 bits corresponding to which corner to round | ||||||
|   | |||||||
| @@ -431,10 +431,10 @@ enum ImGuiButtonFlags_ | |||||||
|     ImGuiButtonFlags_NoHoldingActiveId      = 1 << 13,  // don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only) |     ImGuiButtonFlags_NoHoldingActiveId      = 1 << 13,  // don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only) | ||||||
|     ImGuiButtonFlags_NoNavFocus             = 1 << 14,  // don't override navigation focus when activated |     ImGuiButtonFlags_NoNavFocus             = 1 << 14,  // don't override navigation focus when activated | ||||||
|     ImGuiButtonFlags_NoHoveredOnNav         = 1 << 15,  // don't report as hovered when navigated on |     ImGuiButtonFlags_NoHoveredOnNav         = 1 << 15,  // don't report as hovered when navigated on | ||||||
|     ImGuiButtonFlags_MouseButtonLeft        = 1 << 16,  // [Default] react on left mouse button  |     ImGuiButtonFlags_MouseButtonLeft        = 1 << 16,  // [Default] react on left mouse button | ||||||
|     ImGuiButtonFlags_MouseButtonRight       = 1 << 17,  // react on right mouse button |     ImGuiButtonFlags_MouseButtonRight       = 1 << 17,  // react on right mouse button | ||||||
|     ImGuiButtonFlags_MouseButtonMiddle      = 1 << 18,  // react on center mouse button |     ImGuiButtonFlags_MouseButtonMiddle      = 1 << 18,  // react on center mouse button | ||||||
|      |  | ||||||
|     ImGuiButtonFlags_MouseButtonMask_       = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle, |     ImGuiButtonFlags_MouseButtonMask_       = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle, | ||||||
|     ImGuiButtonFlags_MouseButtonShift_      = 16, |     ImGuiButtonFlags_MouseButtonShift_      = 16, | ||||||
|     ImGuiButtonFlags_MouseButtonDefault_    = ImGuiButtonFlags_MouseButtonLeft, |     ImGuiButtonFlags_MouseButtonDefault_    = ImGuiButtonFlags_MouseButtonLeft, | ||||||
| @@ -1642,7 +1642,7 @@ namespace ImGui | |||||||
|     IMGUI_API void          BringWindowToFocusFront(ImGuiWindow* window); |     IMGUI_API void          BringWindowToFocusFront(ImGuiWindow* window); | ||||||
|     IMGUI_API void          BringWindowToDisplayFront(ImGuiWindow* window); |     IMGUI_API void          BringWindowToDisplayFront(ImGuiWindow* window); | ||||||
|     IMGUI_API void          BringWindowToDisplayBack(ImGuiWindow* window); |     IMGUI_API void          BringWindowToDisplayBack(ImGuiWindow* window); | ||||||
|      |  | ||||||
|     // Fonts, drawing |     // Fonts, drawing | ||||||
|     IMGUI_API void          SetCurrentFont(ImFont* font); |     IMGUI_API void          SetCurrentFont(ImFont* font); | ||||||
|     inline ImFont*          GetDefaultFont() { ImGuiContext& g = *GImGui; return g.IO.FontDefault ? g.IO.FontDefault : g.IO.Fonts->Fonts[0]; } |     inline ImFont*          GetDefaultFont() { ImGuiContext& g = *GImGui; return g.IO.FontDefault ? g.IO.FontDefault : g.IO.Fonts->Fonts[0]; } | ||||||
|   | |||||||
| @@ -3273,8 +3273,8 @@ static bool STB_TEXTEDIT_INSERTCHARS(STB_TEXTEDIT_STRING* obj, int pos, const Im | |||||||
| #define STB_TEXTEDIT_IMPLEMENTATION | #define STB_TEXTEDIT_IMPLEMENTATION | ||||||
| #include "imstb_textedit.h" | #include "imstb_textedit.h" | ||||||
|  |  | ||||||
| // stb_textedit internally allows for a single undo record to do addition and deletion, but somehow, calling  | // stb_textedit internally allows for a single undo record to do addition and deletion, but somehow, calling | ||||||
| // the stb_textedit_paste() function creates two separate records, so we perform it manually. (FIXME: Report to nothings/stb?)  | // the stb_textedit_paste() function creates two separate records, so we perform it manually. (FIXME: Report to nothings/stb?) | ||||||
| static void stb_textedit_replace(STB_TEXTEDIT_STRING* str, STB_TexteditState* state, const STB_TEXTEDIT_CHARTYPE* text, int text_len) | static void stb_textedit_replace(STB_TEXTEDIT_STRING* str, STB_TexteditState* state, const STB_TEXTEDIT_CHARTYPE* text, int text_len) | ||||||
| { | { | ||||||
|     stb_text_makeundo_replace(str, state, 0, str->CurLenW, text_len); |     stb_text_makeundo_replace(str, state, 0, str->CurLenW, text_len); | ||||||
| @@ -3859,7 +3859,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         // When using 'ImGuiInputTextFlags_EnterReturnsTrue' as a special case we reapply the live buffer back to the input buffer before clearing ActiveId, even though strictly speaking it wasn't modified on this frame. |         // When using 'ImGuiInputTextFlags_EnterReturnsTrue' as a special case we reapply the live buffer back to the input buffer before clearing ActiveId, even though strictly speaking it wasn't modified on this frame. | ||||||
|         // If we didn't do that, code like InputInt() with ImGuiInputTextFlags_EnterReturnsTrue would fail.  |         // If we didn't do that, code like InputInt() with ImGuiInputTextFlags_EnterReturnsTrue would fail. | ||||||
|         // This also allows the user to use InputText() with ImGuiInputTextFlags_EnterReturnsTrue without maintaining any user-side storage (please note that if you use this property along ImGuiInputTextFlags_CallbackResize you can end up with your temporary string object unnecessarily allocating once a frame, either store your string data, either if you don't then don't use ImGuiInputTextFlags_CallbackResize). |         // This also allows the user to use InputText() with ImGuiInputTextFlags_EnterReturnsTrue without maintaining any user-side storage (please note that if you use this property along ImGuiInputTextFlags_CallbackResize you can end up with your temporary string object unnecessarily allocating once a frame, either store your string data, either if you don't then don't use ImGuiInputTextFlags_CallbackResize). | ||||||
|         bool apply_edit_back_to_user_buffer = !cancel_edit || (enter_pressed && (flags & ImGuiInputTextFlags_EnterReturnsTrue) != 0); |         bool apply_edit_back_to_user_buffer = !cancel_edit || (enter_pressed && (flags & ImGuiInputTextFlags_EnterReturnsTrue) != 0); | ||||||
|         if (apply_edit_back_to_user_buffer) |         if (apply_edit_back_to_user_buffer) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 omar
					omar