parent
ffe94ef4e2
commit
1a2f6cfcb5
1 changed files with 8 additions and 3 deletions
|
@ -534,9 +534,9 @@ void SpatialEditorViewport::_update_name() {
|
||||||
String view_mode = orthogonal ? TTR("Orthogonal") : TTR("Perspective");
|
String view_mode = orthogonal ? TTR("Orthogonal") : TTR("Perspective");
|
||||||
|
|
||||||
if (name != "")
|
if (name != "")
|
||||||
view_menu->set_text("[ " + name + " " + view_mode + " ]");
|
view_menu->set_text(name + " " + view_mode);
|
||||||
else
|
else
|
||||||
view_menu->set_text("[ " + view_mode + " ]");
|
view_menu->set_text(view_mode);
|
||||||
|
|
||||||
view_menu->set_size(Vector2(0, 0)); // resets the button size
|
view_menu->set_size(Vector2(0, 0)); // resets the button size
|
||||||
}
|
}
|
||||||
|
@ -2260,6 +2260,12 @@ void SpatialEditorViewport::_notification(int p_what) {
|
||||||
surface->connect("mouse_exited", this, "_surface_mouse_exit");
|
surface->connect("mouse_exited", this, "_surface_mouse_exit");
|
||||||
surface->connect("focus_entered", this, "_surface_focus_enter");
|
surface->connect("focus_entered", this, "_surface_focus_enter");
|
||||||
surface->connect("focus_exited", this, "_surface_focus_exit");
|
surface->connect("focus_exited", this, "_surface_focus_exit");
|
||||||
|
view_menu->set_flat(false);
|
||||||
|
view_menu->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||||
|
view_menu->add_style_override("hover", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||||
|
view_menu->add_style_override("pressed", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||||
|
view_menu->add_style_override("focus", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||||
|
view_menu->add_style_override("disabled", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||||
info_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
info_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||||
fps_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
fps_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||||
cinema_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
cinema_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||||
|
@ -3421,7 +3427,6 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
|
||||||
view_menu = memnew(MenuButton);
|
view_menu = memnew(MenuButton);
|
||||||
surface->add_child(view_menu);
|
surface->add_child(view_menu);
|
||||||
view_menu->set_position(Point2(4, 4) * EDSCALE);
|
view_menu->set_position(Point2(4, 4) * EDSCALE);
|
||||||
view_menu->set_self_modulate(Color(1, 1, 1, 0.5));
|
|
||||||
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/top_view"), VIEW_TOP);
|
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/top_view"), VIEW_TOP);
|
||||||
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/bottom_view"), VIEW_BOTTOM);
|
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/bottom_view"), VIEW_BOTTOM);
|
||||||
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/left_view"), VIEW_LEFT);
|
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/left_view"), VIEW_LEFT);
|
||||||
|
|
Loading…
Reference in a new issue