aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/tabs.h
diff options
context:
space:
mode:
authorvolzhs2017-06-16 00:30:03 +0900
committervolzhs2017-06-16 13:21:05 +0900
commitfc2fe7ebd1ed54318ca82a3d20bb8892d9bd7fd2 (patch)
tree1c008c9e41f6c45f2d369f3382604bfce8bdf657 /scene/gui/tabs.h
parent95c248e24fb6094160f9c71140402305b57469ab (diff)
downloadgodot-fc2fe7ebd1ed54318ca82a3d20bb8892d9bd7fd2.tar.gz
godot-fc2fe7ebd1ed54318ca82a3d20bb8892d9bd7fd2.tar.zst
godot-fc2fe7ebd1ed54318ca82a3d20bb8892d9bd7fd2.zip
Enhance scene tabs
- show scene thumbnail on hover - resize if has many tabs - show full scene file name with current edited scene - can be customized EditorSettings > Interface > Scene Tab - close scene with mouse middle button
Diffstat (limited to '')
-rw-r--r--scene/gui/tabs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h
index 61b97d2df..65d409c41 100644
--- a/scene/gui/tabs.h
+++ b/scene/gui/tabs.h
@@ -59,6 +59,7 @@ private:
int ofs_cache;
bool disabled;
int size_cache;
+ int size_text;
int x_cache;
int x_size_cache;
@@ -74,7 +75,6 @@ private:
bool missing_right;
Vector<Tab> tabs;
int current;
- Control *_get_tab(int idx) const;
int _get_top_margin() const;
TabAlign tab_align;
int rb_hover;
@@ -85,9 +85,11 @@ private:
CloseButtonDisplayPolicy cb_displaypolicy;
int hover; // hovered tab
+ int min_width;
int get_tab_width(int p_idx) const;
void _ensure_no_over_offset();
+ void _update_cache();
protected:
void _gui_input(const Ref<InputEvent> &p_event);
@@ -117,13 +119,16 @@ public:
int get_tab_count() const;
void set_current_tab(int p_current);
int get_current_tab() const;
+ int get_hovered_tab() const;
void remove_tab(int p_idx);
void clear_tabs();
void ensure_tab_visible(int p_idx);
+ void set_min_width(int p_width);
+ Rect2 get_tab_rect(int p_tab);
Size2 get_minimum_size() const;
Tabs();