You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
543 B

extends Control
func _on_CancelButton_pressed():
get_tree().change_scene("res://gui/MainMenu.tscn")
func _on_LaunchButton_pressed():
var poll = collect_poll_from_form(self)
if poll:
App.start_poll(poll)
func collect_poll_from_form(form:Control) -> MajorityJudgmentPoll:
var poll = MajorityJudgmentPoll.new()
var title_line_edit = form.find_node("TitleLineEdit", true, false)
if title_line_edit.text:
poll.set_title(title_line_edit.text)
var candidates_tree = form.find_node("CandidatesTree", true, false)
return poll