mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Add middle-click removing for TabBars
Added a boolean option field to enable the firing of the "tab_close_pressed" signal when middle clicking on a tab.
This commit is contained in:
parent
e2b2dce6c5
commit
1a1711f1ee
4 changed files with 24 additions and 7 deletions
|
|
@ -108,6 +108,7 @@ private:
|
|||
int cb_hover = -1;
|
||||
bool cb_pressing = false;
|
||||
CloseButtonDisplayPolicy cb_displaypolicy = CLOSE_BUTTON_SHOW_NEVER;
|
||||
bool close_with_middle_mouse = true;
|
||||
|
||||
int hover = -1; // Hovered tab.
|
||||
int max_width = 0;
|
||||
|
|
@ -239,6 +240,9 @@ public:
|
|||
void set_tab_close_display_policy(CloseButtonDisplayPolicy p_policy);
|
||||
CloseButtonDisplayPolicy get_tab_close_display_policy() const;
|
||||
|
||||
void set_close_with_middle_mouse(bool p_scroll_close);
|
||||
bool get_close_with_middle_mouse() const;
|
||||
|
||||
void set_tab_count(int p_count);
|
||||
int get_tab_count() const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue