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