├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── addons └── script-dock │ ├── plugin.cfg │ └── plugin.gd ├── export_presets.cfg ├── icon.svg ├── icon.svg.import ├── project.godot ├── script-dock.png └── script-dock.png.import /.gitattributes: -------------------------------------------------------------------------------- 1 | # Normalize EOL for all files that Git considers text files. 2 | * text=auto eol=lf 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Godot 4+ specific ignores 2 | .godot/ 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 dugramen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Moves the script list from ScriptEditor to a dock. This increases the available horizontal space for the ScriptEditor, and allows you to make the list a floating window. 2 | 3 | Before: 4 | ![godot-script-dock-before](https://github.com/dugramen/godot-script-dock/assets/54819319/ef7f4177-b9a6-44f7-8a34-9fa897ce8cc3) 5 | 6 | After: 7 | ![godot-script-dock-after](https://github.com/dugramen/godot-script-dock/assets/54819319/b65384b1-1073-4a74-bc6b-056a982a704d) 8 | -------------------------------------------------------------------------------- /addons/script-dock/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="script-dock" 4 | description="Moves the script list from ScriptEditor to a dock. This increases the available horizontal space for the ScriptEditor, and allows you to make the list a floating window." 5 | author="dugramen" 6 | version="" 7 | script="plugin.gd" 8 | -------------------------------------------------------------------------------- /addons/script-dock/plugin.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends EditorPlugin 3 | 4 | var control := MarginContainer.new() 5 | var panel: Control 6 | var default_parent: Control 7 | var script_editor :ScriptEditor = null 8 | var last_screen:='' 9 | 10 | 11 | 12 | func _enter_tree()->void: 13 | #print(" current screen " ,get_main_screen()) 14 | script_editor = EditorInterface.get_script_editor() 15 | script_editor.editor_script_changed.connect(script_visibility_changed) 16 | script_editor.visibility_changed.connect(script_visibility_changed) 17 | 18 | default_parent = script_editor.get_child(0).get_child(1) 19 | panel = default_parent.get_child(0) 20 | panel.reparent(control) 21 | 22 | control.size_flags_horizontal = Control.SIZE_EXPAND_FILL 23 | control.size_flags_vertical = Control.SIZE_EXPAND_FILL 24 | control.name = "Scripts" 25 | add_control_to_dock(EditorPlugin.DOCK_SLOT_LEFT_BR, control) 26 | 27 | ## connect to what screen is active 28 | main_screen_changed.connect(screen_changed) 29 | 30 | 31 | 32 | func screen_changed(screen)->void: 33 | last_screen = screen 34 | if !script_editor && !script_editor.is_visible_in_tree(): 35 | return 36 | var parent: TabContainer = control.get_parent() 37 | 38 | match screen: 39 | "Script": 40 | parent.current_tab = control.get_index() 41 | _: 42 | parent.current_tab = 0 43 | 44 | 45 | func script_visibility_changed(a = null)->void: 46 | if !script_editor && !script_editor.is_visible_in_tree(): 47 | return 48 | 49 | if last_screen=="": 50 | return 51 | 52 | if last_screen=="Script": 53 | var parent: TabContainer = control.get_parent() 54 | parent.current_tab = control.get_index() 55 | 56 | func _exit_tree(): 57 | panel.reparent(default_parent) 58 | default_parent.move_child(panel, 0) 59 | remove_control_from_docks(control) 60 | 61 | -------------------------------------------------------------------------------- /export_presets.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dugramen/godot-script-dock/48f94995b142fff2cc8814d06ce4c1c4fd08ff40/export_presets.cfg -------------------------------------------------------------------------------- /icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://doh8idgy3upl8" 6 | path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://icon.svg" 14 | dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /project.godot: -------------------------------------------------------------------------------- 1 | ; Engine configuration file. 2 | ; It's best edited using the editor UI and not directly, 3 | ; since the parameters that go here are not all obvious. 4 | ; 5 | ; Format: 6 | ; [section] ; section goes between [] 7 | ; param=value ; assign values to parameters 8 | 9 | config_version=5 10 | 11 | [application] 12 | 13 | config/name="script-dock" 14 | config/features=PackedStringArray("4.2", "GL Compatibility") 15 | config/icon="res://icon.svg" 16 | 17 | [dotnet] 18 | 19 | project/assembly_name="script-dock" 20 | 21 | [editor_plugins] 22 | 23 | enabled=PackedStringArray("res://addons/script-dock/plugin.cfg") 24 | 25 | [rendering] 26 | 27 | renderer/rendering_method="gl_compatibility" 28 | renderer/rendering_method.mobile="gl_compatibility" 29 | -------------------------------------------------------------------------------- /script-dock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dugramen/godot-script-dock/48f94995b142fff2cc8814d06ce4c1c4fd08ff40/script-dock.png -------------------------------------------------------------------------------- /script-dock.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cmtp4s5jwqfr4" 6 | path="res://.godot/imported/script-dock.png-3b1af7b166bdcb5f5ea6184b6512da88.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://script-dock.png" 14 | dest_files=["res://.godot/imported/script-dock.png-3b1af7b166bdcb5f5ea6184b6512da88.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | --------------------------------------------------------------------------------