Remember scripts panel's visibility state
This commit is contained in:
parent
e69b7083d4
commit
3f5086990a
1 changed files with 2 additions and 0 deletions
|
@ -1124,6 +1124,7 @@ TypedArray<Script> ScriptEditor::_get_open_scripts() const {
|
||||||
|
|
||||||
bool ScriptEditor::toggle_scripts_panel() {
|
bool ScriptEditor::toggle_scripts_panel() {
|
||||||
list_split->set_visible(!list_split->is_visible());
|
list_split->set_visible(!list_split->is_visible());
|
||||||
|
EditorSettings::get_singleton()->set_project_metadata("scripts_panel", "show_scripts_panel", list_split->is_visible());
|
||||||
return list_split->is_visible();
|
return list_split->is_visible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3697,6 +3698,7 @@ ScriptEditor::ScriptEditor() {
|
||||||
overview_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
|
overview_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
|
||||||
list_split->add_child(overview_vbox);
|
list_split->add_child(overview_vbox);
|
||||||
|
list_split->set_visible(EditorSettings::get_singleton()->get_project_metadata("scripts_panel", "show_scripts_panel", true));
|
||||||
buttons_hbox = memnew(HBoxContainer);
|
buttons_hbox = memnew(HBoxContainer);
|
||||||
overview_vbox->add_child(buttons_hbox);
|
overview_vbox->add_child(buttons_hbox);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue