NO RESTARTTT
This commit is contained in:
		| @@ -26,8 +26,7 @@ func _enable_plugin() -> void: | |||||||
| 	if FileAccess.file_exists(ProjectSettings.globalize_path("res://") + "addons/discord-rpc-gd/bin/.gdignore"): | 	if FileAccess.file_exists(ProjectSettings.globalize_path("res://") + "addons/discord-rpc-gd/bin/.gdignore"): | ||||||
| 		DirAccess.remove_absolute(ProjectSettings.globalize_path("res://") + "addons/discord-rpc-gd/bin/.gdignore") | 		DirAccess.remove_absolute(ProjectSettings.globalize_path("res://") + "addons/discord-rpc-gd/bin/.gdignore") | ||||||
| 	add_autoload_singleton("DiscordRPCLoader","res://addons/discord-rpc-gd/nodes/discord_autoload.gd") | 	add_autoload_singleton("DiscordRPCLoader","res://addons/discord-rpc-gd/nodes/discord_autoload.gd") | ||||||
| 	restart_window.connect("confirmed", save_no_restart) | 	restart_window.connect("confirmed", save_and_restart) | ||||||
| 	restart_window.connect("canceled", save_and_restart) |  | ||||||
| 	get_editor_interface().popup_dialog_centered(restart_window) | 	get_editor_interface().popup_dialog_centered(restart_window) | ||||||
| 	print("IGNORE RED ERROR MESSAGES BEFORE THE SECOND RESTART!") | 	print("IGNORE RED ERROR MESSAGES BEFORE THE SECOND RESTART!") | ||||||
|  |  | ||||||
| @@ -41,9 +40,6 @@ func _disable_plugin() -> void: | |||||||
| func save_and_restart() -> void: | func save_and_restart() -> void: | ||||||
| 	get_editor_interface().restart_editor(true) | 	get_editor_interface().restart_editor(true) | ||||||
|  |  | ||||||
| func save_no_restart() -> void: |  | ||||||
| 	get_editor_interface().restart_editor(false) |  | ||||||
| 	 |  | ||||||
| var editor_presence: Node | var editor_presence: Node | ||||||
| func _on_editor_settings_changed() -> void: | func _on_editor_settings_changed() -> void: | ||||||
| 	plugin_cfg.set_value("Discord","editor_presence",get_editor_interface().get_editor_settings().get_setting("DiscordRPC/EditorPresence/enabled")) | 	plugin_cfg.set_value("Discord","editor_presence",get_editor_interface().get_editor_settings().get_setting("DiscordRPC/EditorPresence/enabled")) | ||||||
|   | |||||||
| @@ -31,8 +31,8 @@ visible = true | |||||||
| transient = false | transient = false | ||||||
| unresizable = true | unresizable = true | ||||||
| theme = SubResource("Theme_swwco") | theme = SubResource("Theme_swwco") | ||||||
| ok_button_text = "Restart" | ok_button_text = "Save and restart" | ||||||
| cancel_button_text = "Save and restart" | cancel_button_text = "Later" | ||||||
|  |  | ||||||
| [node name="Panel" type="Panel" parent="."] | [node name="Panel" type="Panel" parent="."] | ||||||
| anchors_preset = 5 | anchors_preset = 5 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user