mirror of
https://github.com/godotengine/godot.git
synced 2025-10-28 12:14:44 +00:00
Remember state of built-in script/shader checkbox
This commit is contained in:
parent
45fc515ae3
commit
ad9b66100e
2 changed files with 17 additions and 0 deletions
|
|
@ -204,6 +204,11 @@ void ScriptCreateDialog::config(const String &p_base_name, const String &p_base_
|
|||
load_enabled = p_load_enabled;
|
||||
|
||||
_language_changed(language_menu->get_selected());
|
||||
|
||||
if (_can_be_built_in()) {
|
||||
built_in->set_pressed(EditorSettings::get_singleton()->get_project_metadata("script_setup", "create_built_in_script", false));
|
||||
_built_in_pressed();
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptCreateDialog::set_inheritance_base_type(const String &p_base) {
|
||||
|
|
@ -344,6 +349,10 @@ void ScriptCreateDialog::_template_changed(int p_template) {
|
|||
void ScriptCreateDialog::ok_pressed() {
|
||||
if (is_new_script_created) {
|
||||
_create_new();
|
||||
if (_can_be_built_in()) {
|
||||
// Only save state of built-in checkbox if it's enabled.
|
||||
EditorSettings::get_singleton()->set_project_metadata("script_setup", "create_built_in_script", built_in->is_pressed());
|
||||
}
|
||||
} else {
|
||||
_load_exist();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue