VERSION: GODOT 4
I’m trying to change the background color of a ConfirmationDialog and change the size of its title, but it’s not working, can anyone please help me?
var themeWin = preload("res://themes/theme_window.tres")
dialog.theme = themeWin
func _on_task_button_pressed(task_name: String):
var dialog = ConfirmationDialog.new()
dialog.title = ""
dialog.min_size = Vector2i(800, 300)
dialog.max_size = Vector2i(800, 800)
dialog.get_label().text = ": " + task_name + "\n " + str(tasks[task_name]["streak"]) + "\n " + tasks[task_name]["first_offensive_date"]
var theme_label = preload("res://themes/theme_label.tres")
dialog.get_label().theme = theme_label
var themeWin = preload("res://themes/theme_window.tres")
dialog.theme = themeWin
dialog.get_ok_button()
dialog.get_ok_button().text = "Concluir"
var themeOK = preload("res://themes/theme_confirm.tres")
dialog.get_ok_button().theme = themeOK
dialog.get_cancel_button().hide() # Ocultar o botão "Cancel" padrão
dialog.connect("confirmed", Callable(self, "_on_complete_button_pressed").bind(task_name))
add_child(dialog)
dialog.popup_centered()