├── .gitattributes ├── test_scene.tscn ├── quick_screen_change.png ├── addons └── run_screen_toolbar │ ├── screen_button_group.tres │ ├── images │ ├── screen1.png │ ├── screen2.png │ ├── screen3.png │ ├── fullscreen.png │ ├── screen1.png.import │ ├── screen2.png.import │ ├── screen3.png.import │ └── fullscreen.png.import │ ├── plugin.cfg │ ├── screen_toolbar.gd │ ├── menu.gd │ └── screen_toolbar.tscn ├── .gitignore ├── project.godot ├── icon.svg ├── icon.svg.import ├── README.md └── LICENSE /.gitattributes: -------------------------------------------------------------------------------- 1 | # Normalize EOL for all files that Git considers text files. 2 | * text=auto eol=lf 3 | -------------------------------------------------------------------------------- /test_scene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://dr4122ou55i1c"] 2 | 3 | [node name="Node2D" type="Node2D"] 4 | -------------------------------------------------------------------------------- /quick_screen_change.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StayAtHomeDev-Git/Godot-Run-Screen-Toolbar/HEAD/quick_screen_change.png -------------------------------------------------------------------------------- /addons/run_screen_toolbar/screen_button_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ButtonGroup" format=3 uid="uid://bonvx2lfisf0p"] 2 | 3 | [resource] 4 | -------------------------------------------------------------------------------- /addons/run_screen_toolbar/images/screen1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StayAtHomeDev-Git/Godot-Run-Screen-Toolbar/HEAD/addons/run_screen_toolbar/images/screen1.png -------------------------------------------------------------------------------- /addons/run_screen_toolbar/images/screen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StayAtHomeDev-Git/Godot-Run-Screen-Toolbar/HEAD/addons/run_screen_toolbar/images/screen2.png -------------------------------------------------------------------------------- /addons/run_screen_toolbar/images/screen3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StayAtHomeDev-Git/Godot-Run-Screen-Toolbar/HEAD/addons/run_screen_toolbar/images/screen3.png -------------------------------------------------------------------------------- /addons/run_screen_toolbar/images/fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StayAtHomeDev-Git/Godot-Run-Screen-Toolbar/HEAD/addons/run_screen_toolbar/images/fullscreen.png -------------------------------------------------------------------------------- /addons/run_screen_toolbar/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="Run Screen Toolbar" 4 | description="A quick access toolbar for the editor run window settings." 5 | author="StayAtHomeDev" 6 | version="1.0" 7 | script="screen_toolbar.gd" 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Godot-specific ignores 2 | .import/ 3 | .godot/ 4 | export.cfg 5 | export_presets.cfg 6 | 7 | # Imported translations (automatically generated from CSV files) 8 | *.translation 9 | 10 | # Mono-specific ignores 11 | .mono/ 12 | data_*/ 13 | -------------------------------------------------------------------------------- /addons/run_screen_toolbar/screen_toolbar.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends EditorPlugin 3 | 4 | var toolbar 5 | 6 | func _enter_tree() -> void: 7 | toolbar = preload("res://addons/run_screen_toolbar/screen_toolbar.tscn").instantiate() 8 | 9 | add_control_to_container(EditorPlugin.CONTAINER_TOOLBAR, toolbar) 10 | 11 | func _exit_tree() -> void: 12 | remove_control_from_container(EditorPlugin.CONTAINER_TOOLBAR, toolbar) 13 | 14 | toolbar.free() 15 | 16 | func _make_visible(visible): 17 | toolbar.visible = visible 18 | -------------------------------------------------------------------------------- /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="Screen Plugin" 14 | run/main_scene="res://addons/run_screen_toolbar/screen_toolbar.tscn" 15 | config/features=PackedStringArray("4.2", "Forward Plus") 16 | config/icon="res://icon.svg" 17 | 18 | [editor_plugins] 19 | 20 | enabled=PackedStringArray("res://addons/run_screen_toolbar/plugin.cfg") 21 | -------------------------------------------------------------------------------- /icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /addons/run_screen_toolbar/images/screen1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://u5exhbw0kjn" 6 | path="res://.godot/imported/screen1.png-29b6bf74000ec49813a8829cb4dabf77.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/run_screen_toolbar/images/screen1.png" 14 | dest_files=["res://.godot/imported/screen1.png-29b6bf74000ec49813a8829cb4dabf77.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 | -------------------------------------------------------------------------------- /addons/run_screen_toolbar/images/screen2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c3ejs4h6fc5kt" 6 | path="res://.godot/imported/screen2.png-b51c91b8b9dd89544d2eefccc0b985b4.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/run_screen_toolbar/images/screen2.png" 14 | dest_files=["res://.godot/imported/screen2.png-b51c91b8b9dd89544d2eefccc0b985b4.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 | -------------------------------------------------------------------------------- /addons/run_screen_toolbar/images/screen3.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://df4gotxgp7eih" 6 | path="res://.godot/imported/screen3.png-e8c200c44bd19464e05ca6f8c53bfe64.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/run_screen_toolbar/images/screen3.png" 14 | dest_files=["res://.godot/imported/screen3.png-e8c200c44bd19464e05ca6f8c53bfe64.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 | -------------------------------------------------------------------------------- /addons/run_screen_toolbar/images/fullscreen.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://qbhlcmw58y1v" 6 | path="res://.godot/imported/fullscreen.png-40e56e4b36a81dfdf3d27698ce0809a1.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/run_screen_toolbar/images/fullscreen.png" 14 | dest_files=["res://.godot/imported/fullscreen.png-40e56e4b36a81dfdf3d27698ce0809a1.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 | -------------------------------------------------------------------------------- /icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://darwvrjm7mwgk" 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Run Screen Toolbar 2 | I got tired of constantly having to go into the Editor Settings to switch between screens and fullscreen when running a scene in the engine. I use different screens for recording tutorials or working on a project depending on the workflow. So I created a quick toolbar to switch between my three screens and to turn fullscreen off and on. 3 | 4 | ![quick_screen_change](https://github.com/StayAtHomeDev-Git/Godot-Run-Screen-Toolbar/assets/123763219/d96ae370-fbb5-4b28-9031-c3c9d38cf7b6) 5 | 6 | ## Features 7 | 8 | - Quickly switch between Screen 1, 2, and 3 (if you have 3 screens) 9 | - Toggle Fullscreen 10 | - Toolbar reflects current setting on startup 11 | - Toolbar updates if changes are made in the Editor Settings directly 12 | 13 | ## To-Do 14 | 15 | - Beautify code 16 | - Make toolbar aware of number of actual screens (Hard-coded for three currently) 17 | - Possibly add more settings (resolution, etc) 18 | 19 | ## Installation 20 | - Move addons folder into your project folder OR move contents of addons folder into existing addons folder 21 | - Enable plugin in Project Settings 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 StayAtHomeDev 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 | -------------------------------------------------------------------------------- /addons/run_screen_toolbar/menu.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | 3 | extends Control 4 | 5 | signal screen_updated 6 | 7 | var settings 8 | var default_color : Color = Color("777777") 9 | var active_color : Color = Color("FFFFFF") 10 | var screen_buttons : Array = ["Screen1","Screen2","Screen3"] 11 | 12 | # Called when the node enters the scene tree for the first time. 13 | func _ready() -> void: 14 | settings = EditorInterface.get_editor_settings() 15 | settings.settings_changed.connect(get_current_settings) 16 | get_current_settings() 17 | 18 | # Called every frame. 'delta' is the elapsed time since the previous frame. 19 | func _process(delta: float) -> void: 20 | pass 21 | 22 | func get_current_settings() -> void: 23 | var current_screen = settings.get_setting("run/window_placement/screen") 24 | var fullscreen_mode = settings.get_setting("run/window_placement/rect") 25 | for i in screen_buttons: 26 | find_child(i).modulate = default_color 27 | match current_screen: 28 | 0: 29 | find_child("Screen1").modulate = active_color 30 | 1: 31 | find_child("Screen2").modulate = active_color 32 | 2: 33 | find_child("Screen3").modulate = active_color 34 | match fullscreen_mode: 35 | 4: 36 | find_child("Fullscreen").modulate = active_color 37 | 1: 38 | find_child("Fullscreen").modulate = default_color 39 | _: 40 | find_child("Fullscreen").modulate = default_color 41 | 42 | 43 | func update_run_screen(screen, button) -> void: 44 | var current_button = find_child(button) as TextureButton 45 | current_button.modulate = active_color 46 | settings.set_setting("run/window_placement/screen", screen) 47 | 48 | # 1 - Centered; 4 - Force Fullscreen 49 | func update_run_screen_size(state: bool, button) -> void: 50 | var current_button = find_child(button) as TextureButton 51 | match state: 52 | true: 53 | settings.set_setting("run/window_placement/rect", 4) 54 | current_button.modulate = active_color 55 | false: 56 | settings.set_setting("run/window_placement/rect", 1) 57 | current_button.modulate = default_color 58 | 59 | func on_button_hover(button) -> void: 60 | var current_button = find_child(button) as TextureButton 61 | current_button.modulate = settings.get_setting("interface/theme/accent_color") 62 | 63 | func on_button_unhover(button) -> void: 64 | var current_button = find_child(button) as TextureButton 65 | if current_button.button_pressed == false: 66 | current_button.modulate = default_color 67 | 68 | func update_button_color(toggled_on: bool, button) -> void: 69 | var current_button = find_child(button) as TextureButton 70 | match toggled_on: 71 | true: 72 | current_button.modulate = active_color 73 | false: 74 | current_button.modulate = default_color 75 | -------------------------------------------------------------------------------- /addons/run_screen_toolbar/screen_toolbar.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=7 format=3 uid="uid://dxk8atwly7xol"] 2 | 3 | [ext_resource type="Script" path="res://addons/run_screen_toolbar/menu.gd" id="1_31scw"] 4 | [ext_resource type="Texture2D" uid="uid://u5exhbw0kjn" path="res://addons/run_screen_toolbar/images/screen1.png" id="2_3dlhx"] 5 | [ext_resource type="ButtonGroup" uid="uid://bonvx2lfisf0p" path="res://addons/run_screen_toolbar/screen_button_group.tres" id="2_sqte7"] 6 | [ext_resource type="Texture2D" uid="uid://c3ejs4h6fc5kt" path="res://addons/run_screen_toolbar/images/screen2.png" id="3_7kaqg"] 7 | [ext_resource type="Texture2D" uid="uid://df4gotxgp7eih" path="res://addons/run_screen_toolbar/images/screen3.png" id="4_r67h8"] 8 | [ext_resource type="Texture2D" uid="uid://qbhlcmw58y1v" path="res://addons/run_screen_toolbar/images/fullscreen.png" id="5_py07q"] 9 | 10 | [node name="ScreenToolbar" type="Control"] 11 | layout_mode = 3 12 | anchors_preset = 0 13 | script = ExtResource("1_31scw") 14 | 15 | [node name="HBoxContainer" type="HBoxContainer" parent="."] 16 | layout_mode = 0 17 | offset_left = -410.0 18 | offset_top = 5.0 19 | offset_right = -304.0 20 | offset_bottom = 25.0 21 | 22 | [node name="Screen1" type="TextureButton" parent="HBoxContainer"] 23 | custom_minimum_size = Vector2(20, 20) 24 | layout_mode = 2 25 | toggle_mode = true 26 | button_group = ExtResource("2_sqte7") 27 | texture_normal = ExtResource("2_3dlhx") 28 | ignore_texture_size = true 29 | stretch_mode = 0 30 | 31 | [node name="Screen2" type="TextureButton" parent="HBoxContainer"] 32 | modulate = Color(0.466667, 0.466667, 0.466667, 1) 33 | custom_minimum_size = Vector2(20, 20) 34 | layout_mode = 2 35 | toggle_mode = true 36 | button_group = ExtResource("2_sqte7") 37 | texture_normal = ExtResource("3_7kaqg") 38 | ignore_texture_size = true 39 | stretch_mode = 0 40 | 41 | [node name="Screen3" type="TextureButton" parent="HBoxContainer"] 42 | modulate = Color(0.466667, 0.466667, 0.466667, 1) 43 | custom_minimum_size = Vector2(20, 20) 44 | layout_mode = 2 45 | toggle_mode = true 46 | button_group = ExtResource("2_sqte7") 47 | texture_normal = ExtResource("4_r67h8") 48 | ignore_texture_size = true 49 | stretch_mode = 0 50 | 51 | [node name="Fullscreen" type="TextureButton" parent="HBoxContainer"] 52 | custom_minimum_size = Vector2(20, 20) 53 | layout_mode = 2 54 | tooltip_text = "Enable Fullscreen" 55 | toggle_mode = true 56 | texture_normal = ExtResource("5_py07q") 57 | ignore_texture_size = true 58 | stretch_mode = 0 59 | 60 | [connection signal="mouse_entered" from="HBoxContainer/Screen1" to="." method="on_button_hover" binds= ["Screen1"]] 61 | [connection signal="mouse_exited" from="HBoxContainer/Screen1" to="." method="on_button_unhover" binds= ["Screen1"]] 62 | [connection signal="pressed" from="HBoxContainer/Screen1" to="." method="update_run_screen" binds= [0, "Screen1"]] 63 | [connection signal="toggled" from="HBoxContainer/Screen1" to="." method="update_button_color" binds= ["Screen1"]] 64 | [connection signal="mouse_entered" from="HBoxContainer/Screen2" to="." method="on_button_hover" binds= ["Screen2"]] 65 | [connection signal="mouse_exited" from="HBoxContainer/Screen2" to="." method="on_button_unhover" binds= ["Screen2"]] 66 | [connection signal="pressed" from="HBoxContainer/Screen2" to="." method="update_run_screen" binds= [1, "Screen2"]] 67 | [connection signal="toggled" from="HBoxContainer/Screen2" to="." method="update_button_color" binds= ["Screen2"]] 68 | [connection signal="mouse_entered" from="HBoxContainer/Screen3" to="." method="on_button_hover" binds= ["Screen3"]] 69 | [connection signal="mouse_exited" from="HBoxContainer/Screen3" to="." method="on_button_unhover" binds= ["Screen3"]] 70 | [connection signal="pressed" from="HBoxContainer/Screen3" to="." method="update_run_screen" binds= [2, "Screen3"]] 71 | [connection signal="toggled" from="HBoxContainer/Screen3" to="." method="update_button_color" binds= ["Screen3"]] 72 | [connection signal="toggled" from="HBoxContainer/Fullscreen" to="." method="update_run_screen_size" binds= ["Fullscreen"]] 73 | --------------------------------------------------------------------------------