mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	Drag and Drop: Increased payload data type to 32 characters. (#143)
This commit is contained in:
		
							
								
								
									
										4
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -458,7 +458,7 @@ namespace ImGui | ||||
|     // Drag and Drop | ||||
|     // [BETA API] Missing Demo code. API may evolve. | ||||
|     IMGUI_API bool          BeginDragDropSource(ImGuiDragDropFlags flags = 0);                                      // call when the current item is active. If this return true, you can call SetDragDropPayload() + EndDragDropSource() | ||||
|     IMGUI_API bool          SetDragDropPayload(const char* type, const void* data, size_t size, ImGuiCond cond = 0);// type is a user defined string of maximum 12 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui. | ||||
|     IMGUI_API bool          SetDragDropPayload(const char* type, const void* data, size_t size, ImGuiCond cond = 0);// type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui. | ||||
|     IMGUI_API void          EndDragDropSource();                                                                    // only call EndDragDropSource() if BeginDragDropSource() returns true! | ||||
|     IMGUI_API bool          BeginDragDropTarget();                                                                  // call after submitting an item that may receive an item. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget() | ||||
|     IMGUI_API const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0);            // accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released. | ||||
| @@ -1348,7 +1348,7 @@ struct ImGuiPayload | ||||
|     ImGuiID         SourceId;           // Source item id | ||||
|     ImGuiID         SourceParentId;     // Source parent id (if available) | ||||
|     int             DataFrameCount;     // Data timestamp | ||||
|     char            DataType[12 + 1];   // Data type tag (short user-supplied string, 12 characters max) | ||||
|     char            DataType[32+1];     // Data type tag (short user-supplied string, 32 characters max) | ||||
|     bool            Preview;            // Set when AcceptDragDropPayload() was called and mouse has been hovering the target item (nb: handle overlapping drag targets) | ||||
|     bool            Delivery;           // Set when AcceptDragDropPayload() was called and mouse button is released over the target item. | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user