dynamic menu and menu music
This commit is contained in:
parent
1f13716d42
commit
a9efa66b09
18 changed files with 386 additions and 41 deletions
|
@ -5,6 +5,8 @@ extends Panel
|
|||
func _ready() -> void:
|
||||
$ScalingOption.select(GlobalVariables.scaling)
|
||||
$ThemeOption.select(GlobalVariables.theme)
|
||||
$MusicOption.select(GlobalVariables.title_music)
|
||||
$DynamicOption.select(GlobalVariables.title_dynamic)
|
||||
|
||||
func _on_tab_bar_tab_changed(tab: int) -> void:
|
||||
if (thisTab == tab):
|
||||
|
@ -21,3 +23,19 @@ func _on_theme_option_item_selected(index: int) -> void:
|
|||
GlobalVariables.theme = index
|
||||
get_window().set_theme(load(GlobalVariables.theme_index[GlobalVariables.theme]))
|
||||
GlobalVariables.updateConfig()
|
||||
|
||||
func _on_music_option_item_selected(index: int) -> void:
|
||||
GlobalVariables.title_music = index
|
||||
if (index == 0): get_node("../../../Music").stop()
|
||||
else: get_node("../../../Music").play()
|
||||
GlobalVariables.updateConfig()
|
||||
|
||||
func _on_dynamic_option_item_selected(index: int) -> void:
|
||||
GlobalVariables.title_dynamic = index
|
||||
if (index == 0):
|
||||
get_node("../../../BackgroundImage").visible = true
|
||||
get_node("../../../DynamicBackground").visible = false
|
||||
else:
|
||||
get_node("../../../BackgroundImage").visible = false
|
||||
get_node("../../../DynamicBackground").visible = true
|
||||
GlobalVariables.updateConfig()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue