mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	Merge branch 'master' into navigation
This commit is contained in:
		
							
								
								
									
										10
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -414,6 +414,9 @@ namespace ImGui | ||||
|     IMGUI_API void          PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect); | ||||
|     IMGUI_API void          PopClipRect(); | ||||
|  | ||||
|     // Styles | ||||
|     IMGUI_API void          StyleColorsClassic(ImGuiStyle* dst = NULL); | ||||
|  | ||||
|     // Utilities | ||||
|     IMGUI_API bool          IsItemHovered();                                                    // is the last item hovered by mouse (and usable)? or we are currently using Nav and the item is focused. | ||||
|     IMGUI_API bool          IsItemRectHovered();                                                // is the last item hovered by mouse? even if another item is active or window is blocked by popup while we are hovering this | ||||
| @@ -653,8 +656,8 @@ enum ImGuiCol_ | ||||
|     ImGuiCol_FrameBgHovered, | ||||
|     ImGuiCol_FrameBgActive, | ||||
|     ImGuiCol_TitleBg, | ||||
|     ImGuiCol_TitleBgCollapsed, | ||||
|     ImGuiCol_TitleBgActive, | ||||
|     ImGuiCol_TitleBgCollapsed, | ||||
|     ImGuiCol_MenuBarBg, | ||||
|     ImGuiCol_ScrollbarBg, | ||||
|     ImGuiCol_ScrollbarGrab, | ||||
| @@ -965,12 +968,13 @@ public: | ||||
|     inline int                  _grow_capacity(int size) const  { int new_capacity = Capacity ? (Capacity + Capacity/2) : 8; return new_capacity > size ? new_capacity : size; } | ||||
|  | ||||
|     inline void                 resize(int new_size)            { if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; } | ||||
|     inline void                 resize(int new_size, const T& v){ if (new_size > Capacity) reserve(_grow_capacity(new_size)); if (new_size > Size) for (int n = Size; n < new_size; n++) Data[n] = v; Size = new_size; } | ||||
|     inline void                 reserve(int new_capacity) | ||||
|     { | ||||
|         if (new_capacity <= Capacity) return; | ||||
|         T* new_data = (value_type*)ImGui::MemAlloc((size_t)new_capacity * sizeof(value_type)); | ||||
|         T* new_data = (value_type*)ImGui::MemAlloc((size_t)new_capacity * sizeof(T)); | ||||
|         if (Data) | ||||
|             memcpy(new_data, Data, (size_t)Size * sizeof(value_type)); | ||||
|             memcpy(new_data, Data, (size_t)Size * sizeof(T)); | ||||
|         ImGui::MemFree(Data); | ||||
|         Data = new_data; | ||||
|         Capacity = new_capacity; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user