Merge pull request #103024 from cruglet/master
TabBar: Add boolean toggle for middle-click to fire `tab_close_pressed` signal.
This commit is contained in:
@ -245,6 +245,9 @@
|
||||
<member name="clip_tabs" type="bool" setter="set_clip_tabs" getter="get_clip_tabs" default="true">
|
||||
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.
|
||||
</member>
|
||||
<member name="close_with_middle_mouse" type="bool" setter="set_close_with_middle_mouse" getter="get_close_with_middle_mouse" default="true">
|
||||
If [code]true[/code], middle clicking on the mouse will fire the [signal tab_close_pressed] signal.
|
||||
</member>
|
||||
<member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" default="-1">
|
||||
The index of the current selected tab. A value of [code]-1[/code] means that no tab is selected and can only be set when [member deselect_enabled] is [code]true[/code] or if all tabs are hidden or disabled.
|
||||
</member>
|
||||
@ -309,7 +312,7 @@
|
||||
<signal name="tab_close_pressed">
|
||||
<param index="0" name="tab" type="int" />
|
||||
<description>
|
||||
Emitted when a tab's close button is pressed.
|
||||
Emitted when a tab's close button is pressed or when middle-clicking on a tab, if [member close_with_middle_mouse] is enabled.
|
||||
[b]Note:[/b] Tabs are not removed automatically once the close button is pressed, this behavior needs to be programmed manually. For example:
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
|
||||
Reference in New Issue
Block a user