Editor: Adjust layout to work better with task palette on the left

This commit is contained in:
Serhii Snitsaruk 2024-07-04 21:16:35 +02:00
parent 872f7a4532
commit 7d6cc1a828
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
1 changed files with 6 additions and 1 deletions

View File

@ -1548,7 +1548,12 @@ LimboAIEditor::LimboAIEditor() {
hsc->add_child(task_palette);
TaskPalettePlacement palette_placement = (TaskPalettePlacement)(int)EDITOR_GET("limbo_ai/editor/task_palette_placement");
if (palette_placement == TaskPalettePlacement::LEFT_SIDE) {
hsc->move_child(task_palette, 0);
VBoxContainer *editor_vbox = memnew(VBoxContainer);
hsc->add_child(editor_vbox);
toolbar->reparent(editor_vbox);
tab_bar_panel->reparent(editor_vbox);
task_tree->reparent(editor_vbox);
usage_hint->reparent(editor_vbox);
hsc->set_split_offset(300);
} else {
hsc->set_split_offset(-300);