You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Portals - Improve UI and add shortcuts
This PR makes the 'convert rooms' button permanently on the toolbar and accessible whichever node is selected, so you can convert rooms without having to select the RoomManager first. It also adds a togglable item 'view portal culling' to the 'View' menu which is a simple way of setting the RoomManager 'active' setting without the RoomManager being the selected node. Both of these have keyboard shortcuts, which should make it much faster to reconvert rooms and edit. In addition there the string in the 'Perspective' Listbox is modified to show [portals active] when portal culling is operational, for visual feedback. This is updated when you change modes, and when the rooms are invalidated.
This commit is contained in:
@@ -207,7 +207,8 @@ class SpatialEditorViewport : public Control {
|
||||
VIEW_DISPLAY_SHADELESS,
|
||||
VIEW_LOCK_ROTATION,
|
||||
VIEW_CINEMATIC_PREVIEW,
|
||||
VIEW_AUTO_ORTHOGONAL
|
||||
VIEW_AUTO_ORTHOGONAL,
|
||||
VIEW_PORTAL_CULLING,
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -545,6 +546,7 @@ public:
|
||||
TOOL_UNLOCK_SELECTED,
|
||||
TOOL_GROUP_SELECTED,
|
||||
TOOL_UNGROUP_SELECTED,
|
||||
TOOL_CONVERT_ROOMS,
|
||||
TOOL_MAX
|
||||
};
|
||||
|
||||
@@ -624,6 +626,7 @@ private:
|
||||
MENU_TOOL_LOCAL_COORDS,
|
||||
MENU_TOOL_USE_SNAP,
|
||||
MENU_TOOL_OVERRIDE_CAMERA,
|
||||
MENU_TOOL_CONVERT_ROOMS,
|
||||
MENU_TRANSFORM_CONFIGURE_SNAP,
|
||||
MENU_TRANSFORM_DIALOG,
|
||||
MENU_VIEW_USE_1_VIEWPORT,
|
||||
@@ -634,6 +637,7 @@ private:
|
||||
MENU_VIEW_USE_4_VIEWPORTS,
|
||||
MENU_VIEW_ORIGIN,
|
||||
MENU_VIEW_GRID,
|
||||
MENU_VIEW_PORTAL_CULLING,
|
||||
MENU_VIEW_GIZMOS_3D_ICONS,
|
||||
MENU_VIEW_CAMERA_SETTINGS,
|
||||
MENU_LOCK_SELECTED,
|
||||
@@ -762,6 +766,8 @@ public:
|
||||
|
||||
void update_grid();
|
||||
void update_transform_gizmo();
|
||||
void update_portal_tools();
|
||||
void show_advanced_portal_tools(bool p_show);
|
||||
void update_all_gizmos(Node *p_node = nullptr);
|
||||
void snap_selected_nodes_to_floor();
|
||||
void select_gizmo_highlight_axis(int p_axis);
|
||||
|
||||
Reference in New Issue
Block a user