update script to active menu

This commit is contained in:
AleaJactaEst 2021-09-23 20:55:57 +02:00
parent 01756f1f6b
commit 11b0eb46c1
3 changed files with 6 additions and 16 deletions

View file

@ -58,13 +58,8 @@ func _ready():
music_player.connect("finished", self, "_on_stream_finished", []) music_player.connect("finished", self, "_on_stream_finished", [])
func connect_ext( signal_name, target ):
Config.msg_debug("Connect external [signal:" + signal_name + ", func:" + "_on_signal_" + signal_name + "]")
target.connect( signal_name, self, "_on_signal_" + signal_name )
func connect_ext_func( signal_name, target , function_target): func connect_ext_func( signal_name, target , function_target):
Config.msg_debug("Connect external [signal:" + signal_name + ", func:" + "_on_signal_" + signal_name + "]") Config.msg_debug("Connect external [signal:" + signal_name + ", func:" + function_target + "]")
target.connect( signal_name, self, function_target ) target.connect( signal_name, self, function_target )

View file

@ -79,17 +79,12 @@ func _ready():
MusicManager.connect("musicplayer_pressed", self, "_on_signal_musicplayer_pressed") MusicManager.connect("musicplayer_pressed", self, "_on_signal_musicplayer_pressed")
#$option.connect("mute_pressed", self, "update_mute") #$option.connect("mute_pressed", self, "update_mute")
MusicManager.connect("mute_pressed", self, "_on_signal_mute_pressed") MusicManager.connect("mute_pressed", self, "_on_signal_mute_pressed")
MusicManager.connect_ext("musicplayer_pressed", self ) MusicManager.connect_ext_func("musicplayer_pressed", self, "_on_signal_musicplayer_pressed")
MusicManager.connect_ext("mute_pressed", self ) MusicManager.connect_ext_func("mute_pressed", self, "_on_signal_mute_pressed" )
func connect_ext( signal_name, target):
Config.msg_debug("Connect external [signal:" + signal_name + ", func:" + "_on_signal_" + signal_name + "]")
target.connect( signal_name, self, "_on_signal_" + signal_name )
func connect_ext_func( signal_name, target , function_target): func connect_ext_func( signal_name, target , function_target):
Config.msg_debug("Connect external [signal:" + signal_name + ", func:" + "_on_signal_" + signal_name + "]") Config.msg_debug("Connect external [signal:" + signal_name + ", func:" + function_target + "]")
target.connect( signal_name, self, function_target ) target.connect( signal_name, self, function_target )

View file

@ -9,9 +9,9 @@ func _ready():
#get_node("option_settings").connect("mute_pressed", self, "_on_control_mute_pressed") #get_node("option_settings").connect("mute_pressed", self, "_on_control_mute_pressed")
MusicManager.connect("mute_pressed", self, "_on_control_mute_pressed") MusicManager.connect("mute_pressed", self, "_on_control_mute_pressed")
MusicManager.connect("musicplayer_pressed", self, "_on_control_musicplayer_pressed") MusicManager.connect("musicplayer_pressed", self, "_on_control_musicplayer_pressed")
MusicManager.connect_ext( "mute_pressed", self ) MusicManager.connect_ext_func( "mute_pressed", self, "_on_signal_mute_pressed" )
$option_settings.connect( "mute_pressed", self, "_on_control_mute_pressed" ) $option_settings.connect( "mute_pressed", self, "_on_control_mute_pressed" )
$option_settings.connect_ext( "mute_pressed", self ) $option_settings.connect_ext_func( "mute_pressed", self, "_on_signal_mute_pressed" )
update_sound_button() update_sound_button()