summaryrefslogtreecommitdiff
path: root/editor/plugins/spatial_editor_plugin.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-08-11 19:20:08 -0300
committerGitHub <noreply@github.com>2018-08-11 19:20:08 -0300
commit64595f0f6ad2aab38fb14f85c077c6e147326624 (patch)
treeaf2da38310d73429bdad58419e6e2b8e9a086603 /editor/plugins/spatial_editor_plugin.h
parent73cf0fd30524a6acc4400ef069210d90eaba29a2 (diff)
parentac51da2eb65986fbc9d3d2316ee4aac4d4663d67 (diff)
Merge pull request #20928 from JFonS/gizmo_enabling
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.h16
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();