25 lines
475 B
GDScript
25 lines
475 B
GDScript
|
tool
|
||
|
class_name NewGamePanel
|
||
|
extends PopupPanel
|
||
|
|
||
|
signal start_triggered(config)
|
||
|
|
||
|
func _init():
|
||
|
# TODO: load config with ConfigFile
|
||
|
# https://docs.godotengine.org/en/stable/tutorials/io/saving_games.html
|
||
|
pass
|
||
|
|
||
|
func _ready():
|
||
|
# TODO: load previous preferences
|
||
|
$Panel/HBoxContainer/Normal.toggle_mode = true
|
||
|
pass
|
||
|
|
||
|
func _on_Cancel_pressed():
|
||
|
self.hide()
|
||
|
|
||
|
func _on_Start_pressed():
|
||
|
var config = {}
|
||
|
# TODO: save config
|
||
|
emit_signal("start_triggered", config)
|
||
|
self.hide()
|