diff options
| author | JFonS <joan.fonssanchez@gmail.com> | 2018-08-11 23:07:00 +0200 |
|---|---|---|
| committer | JFonS <joan.fonssanchez@gmail.com> | 2018-08-11 23:07:00 +0200 |
| commit | ac51da2eb65986fbc9d3d2316ee4aac4d4663d67 (patch) | |
| tree | cdf6b45ac97b97a3dd21caa1578ca590a08922a0 /editor/plugins/spatial_editor_plugin.h | |
| parent | b9730a695643af15bd97f9b87ae656b735281bba (diff) | |
| download | redot-engine-ac51da2eb65986fbc9d3d2316ee4aac4d4663d67.tar.gz | |
Improvements on the gizmo disabling menu and icon selection bugfix
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.h')
| -rw-r--r-- | editor/plugins/spatial_editor_plugin.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 42e6a24bc5..0ebc11e5df 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -560,10 +560,10 @@ private: MENU_VIEW_USE_4_VIEWPORTS, MENU_VIEW_ORIGIN, MENU_VIEW_GRID, + MENU_VIEW_GIZMOS_3D_ICONS, MENU_VIEW_CAMERA_SETTINGS, MENU_LOCK_SELECTED, MENU_UNLOCK_SELECTED, - MENU_VISIBILITY_SKELETON, MENU_SNAP_TO_FLOOR }; @@ -571,7 +571,7 @@ private: Button *tool_option_button[TOOL_OPT_MAX]; MenuButton *transform_menu; - MenuButton *gizmos_menu; + PopupMenu *gizmos_menu; MenuButton *view_menu; ToolButton *lock_button; @@ -675,8 +675,6 @@ public: Ref<ArrayMesh> get_scale_gizmo(int idx) const { return scale_gizmo[idx]; } Ref<ArrayMesh> get_scale_plane_gizmo(int idx) const { return scale_plane_gizmo[idx]; } - int get_skeleton_visibility_state() const; - void update_transform_gizmo(); void update_all_gizmos(); void snap_selected_nodes_to_floor(); @@ -751,7 +749,13 @@ class EditorSpatialGizmoPlugin : public Resource { GDCLASS(EditorSpatialGizmoPlugin, Resource); - bool hidden; +public: + static const int ON_TOP = 0; + static const int VISIBLE = 1; + static const int HIDDEN = 2; + +private: + int current_state; List<EditorSpatialGizmo *> current_gizmos; HashMap<String, Vector<Ref<SpatialMaterial> > > materials; @@ -779,7 +783,7 @@ public: virtual bool is_gizmo_handle_highlighted(const EditorSpatialGizmo *p_gizmo, int idx) const { return false; } Ref<EditorSpatialGizmo> get_gizmo(Spatial *p_spatial); - void set_hidden(bool p_hidden); + void set_state(int p_state); void unregister_gizmo(EditorSpatialGizmo *p_gizmo); EditorSpatialGizmoPlugin(); |
