summaryrefslogtreecommitdiff
path: root/editor/editor_plugin.cpp
diff options
context:
space:
mode:
authorMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-08-21 01:35:48 -0300
committerMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-08-22 19:18:23 -0300
commit6fa1b5eca7bfcc32c4f9284819a7c3e87b08ad3c (patch)
tree2388d6941760bdbce6a21aa62dd85384586c1595 /editor/editor_plugin.cpp
parent9c696716118b7a190bff3b85a0e0863e521cfba3 (diff)
Add option to move Tile/GridMap editors to another side
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r--editor/editor_plugin.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 137e710c5c..6818de8281 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -353,12 +353,18 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C
SpatialEditor::get_singleton()->add_control_to_menu_panel(p_control);
} break;
- case CONTAINER_SPATIAL_EDITOR_SIDE: {
+ case CONTAINER_SPATIAL_EDITOR_SIDE_LEFT: {
SpatialEditor::get_singleton()->get_palette_split()->add_child(p_control);
SpatialEditor::get_singleton()->get_palette_split()->move_child(p_control, 0);
} break;
+ case CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT: {
+
+ SpatialEditor::get_singleton()->get_palette_split()->add_child(p_control);
+ SpatialEditor::get_singleton()->get_palette_split()->move_child(p_control, 1);
+
+ } break;
case CONTAINER_SPATIAL_EDITOR_BOTTOM: {
SpatialEditor::get_singleton()->get_shader_split()->add_child(p_control);
@@ -369,12 +375,18 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(p_control);
} break;
- case CONTAINER_CANVAS_EDITOR_SIDE: {
+ case CONTAINER_CANVAS_EDITOR_SIDE_LEFT: {
CanvasItemEditor::get_singleton()->get_palette_split()->add_child(p_control);
CanvasItemEditor::get_singleton()->get_palette_split()->move_child(p_control, 0);
} break;
+ case CONTAINER_CANVAS_EDITOR_SIDE_RIGHT: {
+
+ CanvasItemEditor::get_singleton()->get_palette_split()->add_child(p_control);
+ CanvasItemEditor::get_singleton()->get_palette_split()->move_child(p_control, 1);
+
+ } break;
case CONTAINER_CANVAS_EDITOR_BOTTOM: {
CanvasItemEditor::get_singleton()->get_bottom_split()->add_child(p_control);
@@ -403,7 +415,8 @@ void EditorPlugin::remove_control_from_container(CustomControlContainer p_locati
SpatialEditor::get_singleton()->remove_control_from_menu_panel(p_control);
} break;
- case CONTAINER_SPATIAL_EDITOR_SIDE: {
+ case CONTAINER_SPATIAL_EDITOR_SIDE_LEFT:
+ case CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT: {
SpatialEditor::get_singleton()->get_palette_split()->remove_child(p_control);
@@ -418,7 +431,8 @@ void EditorPlugin::remove_control_from_container(CustomControlContainer p_locati
CanvasItemEditor::get_singleton()->remove_control_from_menu_panel(p_control);
} break;
- case CONTAINER_CANVAS_EDITOR_SIDE: {
+ case CONTAINER_CANVAS_EDITOR_SIDE_LEFT:
+ case CONTAINER_CANVAS_EDITOR_SIDE_RIGHT: {
CanvasItemEditor::get_singleton()->get_palette_split()->remove_child(p_control);
@@ -785,10 +799,12 @@ void EditorPlugin::_bind_methods() {
BIND_ENUM_CONSTANT(CONTAINER_TOOLBAR);
BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_MENU);
- BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_SIDE);
+ BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_SIDE_LEFT);
+ BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT);
BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_BOTTOM);
BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_MENU);
- BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE);
+ BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE_LEFT);
+ BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE_RIGHT);
BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_BOTTOM);
BIND_ENUM_CONSTANT(CONTAINER_PROPERTY_EDITOR_BOTTOM);