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.
52 lines
1.3 KiB
52 lines
1.3 KiB
extends Control
|
|
|
|
|
|
# Welcome!
|
|
#
|
|
# You are in the MAIN MENU.
|
|
# There's not much going around in here…
|
|
#
|
|
# The goal of this application is to provide Majority Judgment utilities.
|
|
# Most of the modular/reusable code about MJ is in an addon.
|
|
# Check `addons/majority_judgment/`. (it will move to its own repo someday)
|
|
|
|
|
|
onready var ResumeButton : Button = find_node("ResumePollButton")
|
|
onready var NewPollButton : Button = find_node("NewPollButton")
|
|
|
|
|
|
func _ready():
|
|
NewPollButton.grab_focus()
|
|
ResumeButton.visible = App.has_ongoing_poll()
|
|
var window_size = Vector2(
|
|
# Hmmm. Perhaps rename the Config properties like ProjectSettings'?
|
|
Config.get_parameter(
|
|
"video.window.width",
|
|
ProjectSettings.get_setting("display/window/size/width")
|
|
),
|
|
Config.get_parameter(
|
|
"video.window.height",
|
|
ProjectSettings.get_setting("display/window/size/height")
|
|
)
|
|
)
|
|
OS.window_size = window_size
|
|
|
|
|
|
func _on_ResumePollButton_pressed():
|
|
App.load_ongoing_poll()
|
|
|
|
|
|
func _on_NewPollButton_pressed():
|
|
# var changed = get_tree().change_scene("res://tests/SmsReadingTest.tscn")
|
|
var changed = get_tree().change_scene("res://gui/forms/NewPollForm.tscn")
|
|
if OK != changed:
|
|
printerr("Failed to open the new poll form scene.")
|
|
|
|
|
|
func _on_ExitButton_pressed():
|
|
get_tree().quit()
|
|
|
|
|
|
func _on_SettingsButton_pressed():
|
|
App.go_to_settings()
|