renamed "DiscordSDK" to "DiscordActivity"

This commit is contained in:
Yannik
2023-04-20 18:47:41 +02:00
parent e097da11be
commit 2647cdd14b
4 changed files with 7 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
extends Node extends Node
func _process(delta): func _process(delta):
DiscordSDK.coreupdate() DiscordActivity.coreupdate()

View File

@@ -1,7 +1,7 @@
extends Node extends Node
func _ready(): func _ready():
DiscordSDK.set_app_id(918857075105349632) DiscordActivity.set_app_id(918857075105349632)
DiscordSDK.set_details("Made with GDExtension") DiscordActivity.set_details("Made with GDExtension")
DiscordSDK.set_state("This is a test from GDScript in Godot 4") #TODO:Change functions to variables if possible DiscordActivity.set_state("This is a test from GDScript in Godot 4") #TODO:Change functions to variables if possible
DiscordSDK.refresh_activity() DiscordActivity.refresh_activity()

View File

@@ -18,7 +18,7 @@ void gdextension_initialize(ModuleInitializationLevel p_level)
ClassDB::register_class<DiscordSDK>(); ClassDB::register_class<DiscordSDK>();
discordsdk = memnew(DiscordSDK); discordsdk = memnew(DiscordSDK);
Engine::get_singleton()->register_singleton("DiscordSDK", DiscordSDK::get_singleton()); Engine::get_singleton()->register_singleton("DiscordActivity", DiscordSDK::get_singleton()); // Cant change the class name in the cpp files for some reason
} }
} }
@@ -26,7 +26,7 @@ void gdextension_terminate(ModuleInitializationLevel p_level)
{ {
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE)
{ {
Engine::get_singleton()->unregister_singleton("DiscordSDK"); Engine::get_singleton()->unregister_singleton("DiscordActivity");
memdelete(discordsdk); memdelete(discordsdk);
} }
} }