mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Separate fullscreen state for scene & script editor
This commit is contained in:
		
							parent
							
								
									7dba15b83f
								
							
						
					
					
						commit
						204d3ccf5f
					
				
					 3 changed files with 35 additions and 1 deletions
				
			
		|  | @ -2688,6 +2688,14 @@ void EditorNode::_editor_select(int p_which) { | |||
| 	editor_plugin_screen = new_editor; | ||||
| 	editor_plugin_screen->make_visible(true); | ||||
| 	editor_plugin_screen->selected_notify(); | ||||
| 
 | ||||
| 	if (EditorSettings::get_singleton()->get("interface/separate_distraction_mode")) { | ||||
| 		if (p_which == EDITOR_SCRIPT) { | ||||
| 			set_distraction_free_mode(script_distraction); | ||||
| 		} else { | ||||
| 			set_distraction_free_mode(scene_distraction); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| void EditorNode::add_editor_plugin(EditorPlugin *p_editor) { | ||||
|  | @ -4381,7 +4389,25 @@ bool EditorNode::get_docks_visible() const { | |||
| 
 | ||||
| void EditorNode::_toggle_distraction_free_mode() { | ||||
| 
 | ||||
| 	set_distraction_free_mode(distraction_free->is_pressed()); | ||||
| 	if (EditorSettings::get_singleton()->get("interface/separate_distraction_mode")) { | ||||
| 		int screen = -1; | ||||
| 		for (int i = 0; i < editor_table.size(); i++) { | ||||
| 			if (editor_plugin_screen == editor_table[i]) { | ||||
| 				screen = i; | ||||
| 				break; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if (screen == EDITOR_SCRIPT) { | ||||
| 			script_distraction = not script_distraction; | ||||
| 			set_distraction_free_mode(script_distraction); | ||||
| 		} else { | ||||
| 			scene_distraction = not scene_distraction; | ||||
| 			set_distraction_free_mode(scene_distraction); | ||||
| 		} | ||||
| 	} else { | ||||
| 		set_distraction_free_mode(distraction_free->is_pressed()); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| void EditorNode::set_distraction_free_mode(bool p_enter) { | ||||
|  | @ -4805,6 +4831,9 @@ EditorNode::EditorNode() { | |||
| 	_initializing_addons = false; | ||||
| 	docks_visible = true; | ||||
| 
 | ||||
| 	scene_distraction = false; | ||||
| 	script_distraction = false; | ||||
| 
 | ||||
| 	FileAccess::set_backup_save(true); | ||||
| 
 | ||||
| 	TranslationServer::get_singleton()->set_enabled(false); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ramesh Ravone
						Ramesh Ravone