mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Added SetNextItemWidth() helper to avoid using PushItemWidth/PopItemWidth() for single items.
This commit is contained in:
		
							
								
								
									
										3
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -321,8 +321,9 @@ namespace ImGui | ||||
|     IMGUI_API ImU32         GetColorU32(ImU32 col);                                         // retrieve given color with style alpha applied | ||||
|  | ||||
|     // Parameters stacks (current window) | ||||
|     IMGUI_API void          PushItemWidth(float item_width);                                // width of items for the common item+label case, pixels. 0.0f = default to ~2/3 of windows width, >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side) | ||||
|     IMGUI_API void          PushItemWidth(float item_width);                                // set width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side). 0.0f = default to ~2/3 of windows width,  | ||||
|     IMGUI_API void          PopItemWidth(); | ||||
|     IMGUI_API void          SetNextItemWidth(float item_width);                             // set width of the _next_ common large "item+label" widget. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side) | ||||
|     IMGUI_API float         CalcItemWidth();                                                // width of item given pushed settings and current cursor position | ||||
|     IMGUI_API void          PushTextWrapPos(float wrap_local_pos_x = 0.0f);                 // word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space | ||||
|     IMGUI_API void          PopTextWrapPos(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user