mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 05:01:05 +01:00 
			
		
		
		
	Comments, clarified use of io.MouseDelta (#942)
(ImGuiIO structure layout changed)
This commit is contained in:
		
							
								
								
									
										22
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -788,29 +788,29 @@ struct ImGuiIO | |||||||
|     ImWchar     InputCharacters[16+1];      // List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper. |     ImWchar     InputCharacters[16+1];      // List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper. | ||||||
|  |  | ||||||
|     // Functions |     // Functions | ||||||
|     IMGUI_API void AddInputCharacter(ImWchar c);                        // Helper to add a new character into InputCharacters[] |     IMGUI_API void AddInputCharacter(ImWchar c);                        // Add new character into InputCharacters[] | ||||||
|     IMGUI_API void AddInputCharactersUTF8(const char* utf8_chars);      // Helper to add new characters into InputCharacters[] from an UTF-8 string |     IMGUI_API void AddInputCharactersUTF8(const char* utf8_chars);      // Add new characters into InputCharacters[] from an UTF-8 string | ||||||
|     inline void    ClearInputCharacters() { InputCharacters[0] = 0; }   // Helper to clear the text input buffer |     inline void    ClearInputCharacters() { InputCharacters[0] = 0; }   // Clear the text input buffer manually | ||||||
|  |  | ||||||
|     //------------------------------------------------------------------ |     //------------------------------------------------------------------ | ||||||
|     // Output - Retrieve after calling NewFrame(), you can use them to discard inputs or hide them from the rest of your application |     // Output - Retrieve after calling NewFrame() | ||||||
|     //------------------------------------------------------------------ |     //------------------------------------------------------------------ | ||||||
|  |  | ||||||
|     bool        WantCaptureMouse;           // Mouse is hovering a window or widget is active (= ImGui will use your mouse input) |     bool        WantCaptureMouse;           // Mouse is hovering a window or widget is active (= ImGui will use your mouse input). Use to hide mouse from the rest of your application | ||||||
|     bool        WantCaptureKeyboard;        // Widget is active (= ImGui will use your keyboard input) |     bool        WantCaptureKeyboard;        // Widget is active (= ImGui will use your keyboard input). Use to hide keyboard from the rest of your application | ||||||
|     bool        WantTextInput;              // Some text input widget is active, which will read input characters from the InputCharacters array. |     bool        WantTextInput;              // Some text input widget is active, which will read input characters from the InputCharacters array. Use to activate on screen keyboard if your system needs one | ||||||
|     float       Framerate;                  // Framerate estimation, in frame per second. Rolling average estimation based on IO.DeltaTime over 120 frames |     float       Framerate;                  // Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames | ||||||
|     int         MetricsAllocs;              // Number of active memory allocations |     int         MetricsAllocs;              // Number of active memory allocations | ||||||
|     int         MetricsRenderVertices;      // Vertices output during last call to Render() |     int         MetricsRenderVertices;      // Vertices output during last call to Render() | ||||||
|     int         MetricsRenderIndices;       // Indices output during last call to Render() = number of triangles * 3 |     int         MetricsRenderIndices;       // Indices output during last call to Render() = number of triangles * 3 | ||||||
|     int         MetricsActiveWindows;       // Number of visible windows (exclude child windows) |     int         MetricsActiveWindows;       // Number of visible root windows (exclude child windows) | ||||||
|  |     ImVec2      MouseDelta;                 // Mouse delta. Note that this is zero if either current or previous position are negative, so a disappearing/reappearing mouse won't have a huge delta for one frame. | ||||||
|  |  | ||||||
|     //------------------------------------------------------------------ |     //------------------------------------------------------------------ | ||||||
|     // [Private] ImGui will maintain those fields. Forward compatibility not guaranteed! |     // [Private] ImGui will maintain those fields. Forward compatibility not guaranteed! | ||||||
|     //------------------------------------------------------------------ |     //------------------------------------------------------------------ | ||||||
|  |  | ||||||
|     ImVec2      MousePosPrev;               // Previous mouse position |     ImVec2      MousePosPrev;               // Previous mouse position temporary storage (nb: not for public use, set to MousePos in NewFrame()) | ||||||
|     ImVec2      MouseDelta;                 // Mouse delta. Note that this is zero if either current or previous position are negative to allow mouse enabling/disabling. |  | ||||||
|     bool        MouseClicked[5];            // Mouse button went from !Down to Down |     bool        MouseClicked[5];            // Mouse button went from !Down to Down | ||||||
|     ImVec2      MouseClickedPos[5];         // Position at time of clicking |     ImVec2      MouseClickedPos[5];         // Position at time of clicking | ||||||
|     float       MouseClickedTime[5];        // Time of last click (used to figure out double-click) |     float       MouseClickedTime[5];        // Time of last click (used to figure out double-click) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user