You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add shorthand for using singleton string names
This commit is contained in:
@@ -973,7 +973,7 @@ void ScriptEditor::_queue_close_tabs() {
|
||||
// Maybe there are unsaved changes.
|
||||
if (se->is_unsaved()) {
|
||||
_ask_close_current_unsaved_tab(se);
|
||||
erase_tab_confirm->connect(SceneStringNames::get_singleton()->visibility_changed, callable_mp(this, &ScriptEditor::_queue_close_tabs), CONNECT_ONE_SHOT);
|
||||
erase_tab_confirm->connect(SceneStringName(visibility_changed), callable_mp(this, &ScriptEditor::_queue_close_tabs), CONNECT_ONE_SHOT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -4238,7 +4238,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
||||
|
||||
autosave_timer = memnew(Timer);
|
||||
autosave_timer->set_one_shot(false);
|
||||
autosave_timer->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &ScriptEditor::_update_autosave_timer));
|
||||
autosave_timer->connect(SceneStringName(tree_entered), callable_mp(this, &ScriptEditor::_update_autosave_timer));
|
||||
autosave_timer->connect("timeout", callable_mp(this, &ScriptEditor::_autosave_scripts));
|
||||
add_child(autosave_timer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user