1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Highlight context menu items at the top of the 2D/3D viewports

This makes it easier to notice that some menu items only appear when
specific nodes are selected.

This change applies to both 2D and 3D editors, including both plugin-based
menus and the hardcoded 2D layout/animation contextual menus.
This commit is contained in:
Hugo Locurcio
2021-07-31 00:21:56 +02:00
parent 504f47eaec
commit 1ed24ca548
4 changed files with 67 additions and 7 deletions

View File

@@ -234,6 +234,10 @@ private:
HScrollBar *h_scroll;
VScrollBar *v_scroll;
HBoxContainer *hb;
// Used for secondary menu items which are displayed depending on the currently selected node
// (such as MeshInstance's "Mesh" menu).
PanelContainer *context_menu_container;
HBoxContainer *hbc_context_menu;
ToolButton *zoom_minus;
ToolButton *zoom_reset;
@@ -563,6 +567,7 @@ private:
void _update_bone_list();
void _tree_changed(Node *);
void _update_context_menu_stylebox();
void _popup_warning_temporarily(Control *p_control, const float p_duration);
void _popup_warning_depop(Control *p_control);