1
0
mirror of https://github.com/JohnBreaux/Boat-Battle.git synced 2024-11-14 21:15:58 +00:00

Themes now work on credits page

This commit is contained in:
hpham474 2021-11-22 22:39:42 -06:00
parent 50ad9a2539
commit 6ea3da7205

View File

@ -1,22 +1,21 @@
extends Control extends Control
var light_theme = load("res://light_theme.tres")
# Declare member variables here. Examples: var dark_theme = load("res://dark_theme.tres")
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
pass # Replace with function body. var _errno = 0;
_errno += OptionsController.connect("change_theme", self, "_on_change_theme")
_on_change_theme(OptionsController.get_theme())
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_Back_pressed(): func _on_Back_pressed():
AudioBus.emit_signal("button_clicked") AudioBus.emit_signal("button_clicked")
queue_free() queue_free()
pass # Replace with function body. pass # Replace with function body.
func _on_change_theme(theme):
if theme == "light":
self.set_theme(light_theme)
elif theme == "dark":
self.set_theme(dark_theme)