1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +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

@@ -683,6 +683,10 @@ private:
void _update_camera_override_viewport(Object *p_viewport);
HBoxContainer *hbc_menu;
// 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;
void _generate_selection_boxes();
UndoRedo *undo_redo;
@@ -690,6 +694,7 @@ private:
int camera_override_viewport_id;
void _init_indicators();
void _update_context_menu_stylebox();
void _update_gizmos_menu();
void _update_gizmos_menu_theme();
void _init_grid();