1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Merge pull request #56619 from timothyqiu/left-right-palette

This commit is contained in:
Rémi Verschelde
2022-01-18 16:38:09 +01:00
committed by GitHub
6 changed files with 107 additions and 38 deletions

View File

@@ -1459,10 +1459,10 @@ void GridMapEditorPlugin::_notification(int p_what) {
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
switch ((int)EditorSettings::get_singleton()->get("editors/grid_map/editor_side")) {
case 0: { // Left.
Node3DEditor::get_singleton()->get_palette_split()->move_child(grid_map_editor, 0);
Node3DEditor::get_singleton()->move_control_to_left_panel(grid_map_editor);
} break;
case 1: { // Right.
Node3DEditor::get_singleton()->get_palette_split()->move_child(grid_map_editor, 1);
Node3DEditor::get_singleton()->move_control_to_right_panel(grid_map_editor);
} break;
}
}
@@ -1498,10 +1498,10 @@ GridMapEditorPlugin::GridMapEditorPlugin(EditorNode *p_node) {
grid_map_editor = memnew(GridMapEditor(editor));
switch ((int)EditorSettings::get_singleton()->get("editors/grid_map/editor_side")) {
case 0: { // Left.
add_control_to_container(CONTAINER_SPATIAL_EDITOR_SIDE_LEFT, grid_map_editor);
Node3DEditor::get_singleton()->add_control_to_left_panel(grid_map_editor);
} break;
case 1: { // Right.
add_control_to_container(CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT, grid_map_editor);
Node3DEditor::get_singleton()->add_control_to_right_panel(grid_map_editor);
} break;
}
grid_map_editor->hide();