mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	Tab Bar: Fixed using more than 128 tabs in a tab bar.
Using ImS16 consistently + some better packing to avoid struct growing size.
This commit is contained in:
		| @@ -1736,8 +1736,8 @@ struct ImGuiTabItem | ||||
|     float               Width;                  // Width currently displayed | ||||
|     float               ContentWidth;           // Width of label, stored during BeginTabItem() call | ||||
|     ImS16               NameOffset;             // When Window==NULL, offset to name within parent ImGuiTabBar::TabsNames | ||||
|     ImS8                BeginOrder;             // BeginTabItem() order, used to re-order tabs after toggling ImGuiTabBarFlags_Reorderable | ||||
|     ImS8                IndexDuringLayout;      // Index only used during TabBarLayout() | ||||
|     ImS16               BeginOrder;             // BeginTabItem() order, used to re-order tabs after toggling ImGuiTabBarFlags_Reorderable | ||||
|     ImS16               IndexDuringLayout;      // Index only used during TabBarLayout() | ||||
|     bool                WantClose;              // Marked as closed by SetTabItemClosed() | ||||
|  | ||||
|     ImGuiTabItem()      { ID = 0; Flags = ImGuiTabItemFlags_None; LastFrameVisible = LastFrameSelected = -1; NameOffset = -1; Offset = Width = ContentWidth = 0.0f; BeginOrder = -1; IndexDuringLayout = -1; WantClose = false; } | ||||
| @@ -1767,14 +1767,14 @@ struct ImGuiTabBar | ||||
|     float               ScrollingRectMaxX; | ||||
|     ImGuiID             ReorderRequestTabId; | ||||
|     ImS8                ReorderRequestDir; | ||||
|     ImS8                TabsActiveCount;        // Number of tabs submitted this frame. | ||||
|     ImS8                LastTabItemIdx;         // Index of last BeginTabItem() tab for use by EndTabItem() | ||||
|     ImS8                BeginCount; | ||||
|     bool                WantLayout; | ||||
|     bool                VisibleTabWasSubmitted; | ||||
|     bool                TabsAddedNew;           // Set to true when a new tab item or button has been added to the tab bar during last frame | ||||
|     ImS16               TabsActiveCount;        // Number of tabs submitted this frame. | ||||
|     ImS16               LastTabItemIdx;         // Index of last BeginTabItem() tab for use by EndTabItem() | ||||
|     float               ItemSpacingY; | ||||
|     ImVec2              FramePadding;           // style.FramePadding locked at the time of BeginTabBar() | ||||
|     ImVec2              TabsContentsMin; | ||||
|     ImVec2              BackupCursorPos; | ||||
|     ImGuiTextBuffer     TabsNames;              // For non-docking tab bar we re-append names in a contiguous buffer. | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user