summaryrefslogtreecommitdiffstats
path: root/editor/plugins/spatial_editor_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.h')
-rw-r--r--editor/plugins/spatial_editor_plugin.h51
1 files changed, 46 insertions, 5 deletions
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index 394002db3b..6b05a8b370 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -84,6 +84,11 @@ class SpatialEditorViewport : public Control {
VIEW_ORTHOGONAL,
VIEW_AUDIO_LISTENER,
VIEW_GIZMOS,
+ VIEW_INFORMATION,
+ VIEW_DISPLAY_NORMAL,
+ VIEW_DISPLAY_WIREFRAME,
+ VIEW_DISPLAY_OVERDRAW,
+ VIEW_DISPLAY_SHADELESS,
};
public:
@@ -116,6 +121,9 @@ private:
bool freelook_active;
+ PanelContainer *info;
+ Label *info_label;
+
struct _RayResult {
Spatial *item;
@@ -287,6 +295,43 @@ public:
~SpatialEditorSelectedItem();
};
+class SpatialEditorViewportContainer : public Container {
+
+ GDCLASS(SpatialEditorViewportContainer, Container)
+public:
+ enum View {
+ VIEW_USE_1_VIEWPORT,
+ VIEW_USE_2_VIEWPORTS,
+ VIEW_USE_2_VIEWPORTS_ALT,
+ VIEW_USE_3_VIEWPORTS,
+ VIEW_USE_3_VIEWPORTS_ALT,
+ VIEW_USE_4_VIEWPORTS,
+ };
+
+private:
+ View view;
+ bool mouseover;
+ float ratio_h;
+ float ratio_v;
+
+ bool dragging_v;
+ bool dragging_h;
+ Vector2 drag_begin_pos;
+ Vector2 drag_begin_ratio;
+
+ void _gui_input(const Ref<InputEvent> &p_event);
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+
+public:
+ void set_view(View p_view);
+ View get_view();
+
+ SpatialEditorViewportContainer();
+};
+
class SpatialEditor : public VBoxContainer {
GDCLASS(SpatialEditor, VBoxContainer);
@@ -309,7 +354,7 @@ private:
EditorNode *editor;
EditorSelection *editor_selection;
- Control *viewport_base;
+ SpatialEditorViewportContainer *viewport_base;
SpatialEditorViewport *viewports[VIEWPORTS_COUNT];
VSplitContainer *shader_split;
HSplitContainer *palette_split;
@@ -379,10 +424,6 @@ private:
MENU_VIEW_USE_3_VIEWPORTS,
MENU_VIEW_USE_3_VIEWPORTS_ALT,
MENU_VIEW_USE_4_VIEWPORTS,
- MENU_VIEW_DISPLAY_NORMAL,
- MENU_VIEW_DISPLAY_WIREFRAME,
- MENU_VIEW_DISPLAY_OVERDRAW,
- MENU_VIEW_DISPLAY_SHADELESS,
MENU_VIEW_ORIGIN,
MENU_VIEW_GRID,
MENU_VIEW_CAMERA_SETTINGS,