From a811ebf6993aada1ba5f0f9502976e10fad8b179 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Wed, 2 Mar 2022 11:37:10 -0300 Subject: Make `TabContainer` use `TabBar` internally --- doc/classes/TabBar.xml | 7 ++++++ doc/classes/TabContainer.xml | 56 ++++++++++++++++++++++++-------------------- 2 files changed, 37 insertions(+), 26 deletions(-) (limited to 'doc') diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index 40d6e9f26c..41e1e255ae 100644 --- a/doc/classes/TabBar.xml +++ b/doc/classes/TabBar.xml @@ -57,6 +57,13 @@ Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D]. + + + + + Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position. + + diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 3986983155..3f4ec81c95 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -43,20 +43,6 @@ Returns the number of tabs. - - - - - Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled. - - - - - - - Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is hidden. - - @@ -71,6 +57,13 @@ Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position. + + + + + Returns the index of the tab tied to the given [code]control[/code]. The control must be a child of the [TabContainer]. + + @@ -84,11 +77,25 @@ Returns the [TabContainer] rearrange group id. + + + + + Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled. + + + + + + + Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is hidden. + + - If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [TabContainer]. Clicking it will expand the [Popup] node. + If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [TabContainer] (setting it to [code]null[/code] will make it go away). Clicking it will expand the [Popup] node. @@ -120,7 +127,7 @@ - Sets a title for the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node. + Sets a custom title for the tab at index [code]tab_idx[/code] (tab titles default to the name of the indexed child node). Set it to blank to make it the child's name again. @@ -135,13 +142,17 @@ If [code]true[/code], all tabs are drawn in front of the panel. If [code]false[/code], inactive tabs are drawn behind the panel. + + If [code]true[/code], tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible. + The current tab index. When set, this index's [Control] node's [code]visible[/code] property is set to [code]true[/code] and all others are set to [code]false[/code]. If [code]true[/code], tabs can be rearranged with mouse drag. - + + Sets the position at which tabs will be placed. See [enum TabBar.AlignmentMode] for details. If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden. @@ -169,14 +180,6 @@ - - - - - - - - Font color of disabled tabs. @@ -197,7 +200,8 @@ The size of the tab text outline. - The space at the left and right edges of the tab bar. + The space at the left or right edges of the tab bar, accordingly with the current [member tab_alignment]. + The margin is ignored with [code]ALIGNMENT_RIGHT[/code] if the tabs are clipped (see [member clip_tabs]) or a popup has been set (see [method set_popup]). The margin is always ignored with [code]ALIGNMENT_CENTER[/code]. The font used to draw tab names. -- cgit v1.2.3