fixed restart window and editor presence project settings
This commit is contained in:
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://csl0e2px0cwc1"
|
||||
path="res://.godot/imported/Logo_V2_No_Bg.png-e3342efea6196122a36ea06a342b2ba2.ctex"
|
||||
path="res://.godot/imported/Logo_V2_No_Bg.png-9c8178062d6891c8370df63a912bd8e2.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Logo_V2_No_Bg.png"
|
||||
dest_files=["res://.godot/imported/Logo_V2_No_Bg.png-e3342efea6196122a36ea06a342b2ba2.ctex"]
|
||||
source_file="res://addons/discord-sdk-gd/Logo_V2_No_Bg.png"
|
||||
dest_files=["res://.godot/imported/Logo_V2_No_Bg.png-9c8178062d6891c8370df63a912bd8e2.ctex"]
|
||||
|
||||
[params]
|
||||
|
@@ -3,5 +3,5 @@
|
||||
name="DiscordSDK"
|
||||
description="Discord Game SDK support for GDScript in Godot"
|
||||
author="vaporvee"
|
||||
version="3.0"
|
||||
version="3.1"
|
||||
script="plugin.gd"
|
||||
|
@@ -4,26 +4,29 @@ extends EditorPlugin
|
||||
const DiscordSDKDebug = preload("res://addons/discord-sdk-gd/nodes/debug.gd")
|
||||
const DiscordSDKDebug_icon = preload("res://addons/discord-sdk-gd/nodes/assets/Debug.svg")
|
||||
var loaded_DiscordSDKDebug = DiscordSDKDebug.new()
|
||||
var restart_window: ConfirmationDialog = preload("res://addons/discord-sdk-gd/nodes/restart_window.tscn").instantiate()
|
||||
var restart_window: Control = preload("res://addons/discord-sdk-gd/restart_window.tscn").instantiate()
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
add_custom_type("DiscordSDKDebug","Node",DiscordSDKDebug,DiscordSDKDebug_icon)
|
||||
add_autoload_singleton("DiscordSDKLoader", "res://addons/discord-sdk-gd/nodes/core_updater.gd")
|
||||
|
||||
func _enable_plugin() -> void:
|
||||
if FileAccess.file_exists(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/bin/.gdignore"):
|
||||
DirAccess.remove_absolute(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/bin/.gdignore")
|
||||
ProjectSettings.set_setting("DiscordSDK/EditorPresence/enabled",false)
|
||||
ProjectSettings.set_as_basic("DiscordSDK/EditorPresence/enabled",true)
|
||||
ProjectSettings.set_initial_value("DiscordSDK/EditorPresence/enabled",false)
|
||||
ProjectSettings.set_restart_if_changed("DiscordSDK/EditorPresence/enabled",true)
|
||||
get_tree().root.add_child(restart_window)
|
||||
restart_window.connect("canceled",save_restart)
|
||||
restart_window.connect("confirmed",restart)
|
||||
|
||||
func _enable_plugin() -> void:
|
||||
if FileAccess.file_exists(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/bin/.gdignore"):
|
||||
DirAccess.remove_absolute(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/bin/.gdignore")
|
||||
if FileAccess.file_exists(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/nodes/.gdignore"):
|
||||
DirAccess.remove_absolute(ProjectSettings.globalize_path("res://") + "addons/discord-sdk-gd/nodes/.gdignore")
|
||||
add_control_to_container(EditorPlugin.CONTAINER_TOOLBAR,restart_window)
|
||||
restart_window.get_child(0).connect("canceled",save_restart)
|
||||
restart_window.get_child(0).connect("confirmed",restart)
|
||||
|
||||
func _disable_plugin() -> void:
|
||||
FileAccess.open("res://addons/discord-sdk-gd/bin/.gdignore",FileAccess.WRITE)
|
||||
FileAccess.open("res://addons/discord-sdk-gd/nodes/.gdignore",FileAccess.WRITE)
|
||||
push_warning("DiscordSDK Addon got disabled. PLEASE RESTART THE EDITOR!")
|
||||
remove_autoload_singleton("DiscordSDKLoader")
|
||||
remove_custom_type("DiscordSDKDebug")
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://byc4c6d5tpomq"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://csl0e2px0cwc1" path="res://assets/Logo_V2_No_Bg.png" id="1_r3i13"]
|
||||
[ext_resource type="Texture2D" uid="uid://csl0e2px0cwc1" path="res://addons/discord-sdk-gd/Logo_V2_No_Bg.png" id="1_f828l"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1t7mm"]
|
||||
|
||||
@@ -9,7 +9,7 @@ Button/styles/focus = SubResource("StyleBoxEmpty_1t7mm")
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5vqdt"]
|
||||
|
||||
[sub_resource type="Image" id="Image_ylyvr"]
|
||||
[sub_resource type="Image" id="Image_a0m8b"]
|
||||
data = {
|
||||
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 168, 224, 224, 224, 233, 224, 224, 224, 236, 224, 224, 224, 170, 231, 231, 231, 31, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 234, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 239, 230, 230, 230, 30, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 168, 224, 224, 224, 255, 224, 224, 224, 186, 224, 224, 224, 32, 224, 224, 224, 33, 224, 224, 224, 187, 224, 224, 224, 255, 225, 225, 225, 167, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 237, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 255, 224, 224, 224, 234, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 237, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 229, 229, 229, 38, 224, 224, 224, 255, 224, 224, 224, 229, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 164, 224, 224, 224, 255, 224, 224, 224, 187, 225, 225, 225, 34, 227, 227, 227, 36, 224, 224, 224, 192, 224, 224, 224, 255, 224, 224, 224, 162, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 24, 225, 225, 225, 215, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 229, 224, 224, 224, 32, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 24, 224, 224, 224, 216, 224, 224, 224, 255, 224, 224, 224, 210, 224, 224, 224, 161, 224, 224, 224, 232, 224, 224, 224, 231, 225, 225, 225, 159, 230, 230, 230, 30, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 107, 224, 224, 224, 255, 224, 224, 224, 210, 230, 230, 230, 20, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 105, 230, 230, 230, 20, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 221, 224, 224, 224, 130, 255, 255, 255, 1, 255, 255, 255, 1, 225, 225, 225, 134, 224, 224, 224, 224, 225, 225, 225, 223, 224, 224, 224, 132, 255, 255, 255, 1, 255, 255, 255, 6, 224, 224, 224, 137, 224, 224, 224, 231, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 130, 225, 225, 225, 133, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 129, 224, 224, 224, 137, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 65, 224, 224, 224, 255, 224, 224, 224, 220, 225, 225, 225, 223, 224, 224, 224, 255, 226, 226, 226, 61, 224, 224, 224, 65, 224, 224, 224, 255, 224, 224, 224, 222, 224, 224, 224, 231, 224, 224, 224, 255, 227, 227, 227, 62, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 67, 224, 224, 224, 255, 224, 224, 224, 219, 224, 224, 224, 222, 224, 224, 224, 255, 227, 227, 227, 63, 225, 225, 225, 67, 224, 224, 224, 255, 224, 224, 224, 219, 224, 224, 224, 230, 224, 224, 224, 255, 227, 227, 227, 63, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 127, 224, 224, 224, 129, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 126, 225, 225, 225, 135, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 221, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 1, 224, 224, 224, 128, 224, 224, 224, 220, 224, 224, 224, 219, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 5, 225, 225, 225, 134, 224, 224, 224, 229, 224, 224, 224, 255, 255, 255, 255, 0),
|
||||
"format": "RGBA8",
|
||||
@@ -19,67 +19,85 @@ data = {
|
||||
}
|
||||
|
||||
[sub_resource type="ImageTexture" id="ImageTexture_gdtpn"]
|
||||
image = SubResource("Image_ylyvr")
|
||||
image = SubResource("Image_a0m8b")
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7v0rg"]
|
||||
|
||||
[node name="RestartWindow" type="ConfirmationDialog"]
|
||||
[node name="RestartWindow" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -200.0
|
||||
offset_top = -171.5
|
||||
offset_right = 200.0
|
||||
offset_bottom = 171.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="ConfirmationDialog" type="ConfirmationDialog" parent="."]
|
||||
title = "Restart required"
|
||||
initial_position = 2
|
||||
size = Vector2i(416, 400)
|
||||
visible = true
|
||||
transient = false
|
||||
unresizable = true
|
||||
theme = SubResource("Theme_swwco")
|
||||
ok_button_text = "Restart"
|
||||
cancel_button_text = "Save and restart"
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
[node name="Panel" type="Panel" parent="ConfirmationDialog"]
|
||||
offset_left = 8.0
|
||||
offset_top = 8.0
|
||||
offset_right = 408.0
|
||||
offset_bottom = 351.0
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="ConfirmationDialog/Panel"]
|
||||
custom_minimum_size = Vector2(400, 0)
|
||||
layout_mode = 0
|
||||
offset_right = 400.0
|
||||
offset_bottom = 309.0
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="Panel/VBoxContainer"]
|
||||
[node name="HSeparator" type="HSeparator" parent="ConfirmationDialog/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
mouse_filter = 1
|
||||
theme_override_constants/separation = 15
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_5vqdt")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="ConfirmationDialog/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="DocsIcon" type="TextureRect" parent="Panel/VBoxContainer/HBoxContainer"]
|
||||
[node name="DocsIcon" type="TextureRect" parent="ConfirmationDialog/Panel/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 4
|
||||
texture = SubResource("ImageTexture_gdtpn")
|
||||
stretch_mode = 2
|
||||
|
||||
[node name="LinkButton" type="LinkButton" parent="Panel/VBoxContainer/HBoxContainer"]
|
||||
[node name="LinkButton" type="LinkButton" parent="ConfirmationDialog/Panel/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
mouse_default_cursor_shape = 16
|
||||
text = "Plugin Docs"
|
||||
uri = "https://github.com/vaporvee/discord-sdk-godot/wiki"
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/VBoxContainer"]
|
||||
[node name="TextureRect" type="TextureRect" parent="ConfirmationDialog/Panel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(128, 128)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 0
|
||||
texture = ExtResource("1_r3i13")
|
||||
texture = ExtResource("1_f828l")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="Panel/VBoxContainer"]
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="ConfirmationDialog/Panel/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(400, 200)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@@ -93,4 +111,5 @@ made by vaporvee. ❤️
|
||||
|
||||
|
||||
You need to [wave]restart[/wave] the editor to fully enable this plugin!
|
||||
Do you want to [wave]save[/wave] your project before restarting?"
|
||||
Do you want to [wave]save[/wave] your project before restarting?
|
||||
(Error messages after the first restart are normal. Please ignore them)"
|
@@ -19,6 +19,10 @@ boot_splash/image="res://assets/Banner_v1.png"
|
||||
boot_splash/fullsize=false
|
||||
config/icon="res://assets/Logo_V2.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
DiscordSDKLoader="*res://addons/discord-sdk-gd/nodes/core_updater.gd"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/resizable=false
|
||||
@@ -27,6 +31,10 @@ window/size/resizable=false
|
||||
|
||||
project/assembly_name="GDExtension Test Project"
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
enabled=PackedStringArray("res://addons/discord-sdk-gd/plugin.cfg")
|
||||
|
||||
[filesystem]
|
||||
|
||||
import/blender/enabled=false
|
||||
|
Reference in New Issue
Block a user