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
2020-02-03 20:07:21 +01:00
parent b4778082d1
commit 81d2d2b41a
4 changed files with 71 additions and 7 deletions

View File

@ -230,6 +230,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;
Map<Control *, Timer *> popup_temporarily_timers;
@ -535,6 +539,7 @@ private:
HSplitContainer *palette_split;
VSplitContainer *bottom_split;
void _update_context_menu_stylebox();
void _popup_warning_temporarily(Control *p_control, const float p_duration);
void _popup_warning_depop(Control *p_control);