fixed discord not being disabled when the button is unchecked
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dqg674t6kun4e"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://vnpslgl788du" path="res://settings.gd" id="1_uaa7d"]
|
||||
[ext_resource type="Script" uid="uid://kt7n1epi3ng8" path="res://eq_settings.gd" id="2_1n4m6"]
|
||||
[ext_resource type="Script" path="res://settings.gd" id="1_uaa7d"]
|
||||
[ext_resource type="Script" path="res://eq_settings.gd" id="2_1n4m6"]
|
||||
[ext_resource type="Texture2D" uid="uid://1rstn6r2wisy" path="res://X.png" id="2_iuivb"]
|
||||
[ext_resource type="Texture2D" uid="uid://pgij783wgbhn" path="res://File.png" id="2_jmen4"]
|
||||
|
||||
|
||||
@@ -121,9 +121,6 @@ func _ready() -> void:
|
||||
child.PlaylistSongs = Playlists[Playlist]
|
||||
playlists_holder.add_child(child)
|
||||
if data != null:
|
||||
if data.has("DiscordUsername"):
|
||||
DiscordUsername = data["DiscordUsername"]
|
||||
print("stiff ",data)
|
||||
if data.has("Volume"):
|
||||
print(data["Volume"])
|
||||
SetVolume(data["Volume"])
|
||||
@@ -141,6 +138,13 @@ func _ready() -> void:
|
||||
if data.has("DiscordRichPresenceEnabled"):
|
||||
settings_menu_child.discord_rich_presence_button.set_pressed_no_signal(data["DiscordRichPresenceEnabled"])
|
||||
DiscordRichPresenceEnabled = data["DiscordRichPresenceEnabled"]
|
||||
if data["DiscordRichPresenceEnabled"]:
|
||||
setUpDiscord()
|
||||
if data.has("DiscordUsername"):
|
||||
if data["DiscordUsername"]:
|
||||
if DiscordRichPresenceEnabled:
|
||||
DiscordUsername = data["DiscordUsername"]
|
||||
print("stiff ",data)
|
||||
if data.has("ReverbEnabled") :
|
||||
settings_menu_child.reverb_check.button_pressed = data["ReverbEnabled"]
|
||||
if data.has("ReverbRoomSize") :
|
||||
@@ -189,7 +193,6 @@ func _ready() -> void:
|
||||
PlaySongs()
|
||||
#PlaySongs()
|
||||
|
||||
setUpDiscord()
|
||||
for child in get_children(true):
|
||||
if child is Control:
|
||||
child.focus_mode = child is LineEdit
|
||||
@@ -490,21 +493,22 @@ func _process(_delta: float) -> void:
|
||||
BackroundSetup = true
|
||||
if currentSaveTime < 0:
|
||||
currentSaveTime = SaveInterval
|
||||
|
||||
DiscordUsername = DiscordRPC.get_current_user().get("username")
|
||||
if DiscordRichPresenceEnabled:
|
||||
DiscordUsername = DiscordRPC.get_current_user().get("username")
|
||||
if !LoadingSaveFailed:
|
||||
SaveEverything()
|
||||
@warning_ignore("integer_division")
|
||||
if DiscordRPC.large_image != "nullbody":
|
||||
UpdateSplashes()
|
||||
if DiscordRPC.get_is_discord_working():
|
||||
print(DiscordRPC.get_current_user()["username"])
|
||||
print(TimeSpentListening)
|
||||
var LText = SplashStrings.pick_random()
|
||||
if DiscordRPC.large_image != "nullbody":
|
||||
DiscordRPC.large_image_text = LText
|
||||
if DiscordRPC.get_is_discord_working():
|
||||
DiscordRPC.refresh()
|
||||
if DiscordRichPresenceEnabled:
|
||||
if DiscordRPC.large_image != "nullbody":
|
||||
UpdateSplashes()
|
||||
if DiscordRPC.get_is_discord_working():
|
||||
print(DiscordRPC.get_current_user()["username"])
|
||||
print(TimeSpentListening)
|
||||
var LText = SplashStrings.pick_random()
|
||||
if DiscordRPC.large_image != "nullbody":
|
||||
DiscordRPC.large_image_text = LText
|
||||
if DiscordRPC.get_is_discord_working():
|
||||
DiscordRPC.refresh()
|
||||
# "59:59 remaining" timestamp for the activity
|
||||
if music_player.playing:
|
||||
TimeSpentListening += _delta
|
||||
|
||||
@@ -148,6 +148,7 @@ func _on_discord_rich_presence_button_toggled(toggled_on: bool) -> void:
|
||||
Parent.DiscordRichPresenceEnabled = true
|
||||
else:
|
||||
Parent.DiscordRichPresenceEnabled = false
|
||||
Parent.setUpDiscord()
|
||||
Parent.SaveEverything()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user