You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Let EditorPlugins set editor/distraction-free mode
This commit is contained in:
@@ -2775,6 +2775,20 @@ void EditorNode::_editor_select(int p_which) {
|
||||
}
|
||||
}
|
||||
|
||||
void EditorNode::select_editor_by_name(const String &p_name) {
|
||||
ERR_FAIL_COND(p_name == "");
|
||||
|
||||
for (int i = 0; i < main_editor_buttons.size(); i++) {
|
||||
if (main_editor_buttons[i]->get_text() == p_name) {
|
||||
_editor_select(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ERR_EXPLAIN("The editor name '" + p_name + "' was not found.");
|
||||
ERR_FAIL();
|
||||
}
|
||||
|
||||
void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed) {
|
||||
|
||||
if (p_editor->has_main_screen()) {
|
||||
|
||||
Reference in New Issue
Block a user