parent
435c5c3b72
commit
3a28f6ee00
@ -1,2 +1,35 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
var config:ConfigResource
|
||||||
|
var config_path := "user://settings.tres"
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
load_config()
|
||||||
|
|
||||||
|
|
||||||
|
func go_to_main_menu():
|
||||||
|
get_tree().change_scene("res://gui/MainMenu.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
func load_config():
|
||||||
|
if File.new().file_exists(self.config_path):
|
||||||
|
self.config = load(self.config_path)
|
||||||
|
if null == self.config:
|
||||||
|
self.config = ConfigResource.new()
|
||||||
|
|
||||||
|
|
||||||
|
func save_config():
|
||||||
|
var saved = ResourceSaver.save(self.config_path, self.config)
|
||||||
|
if OK != saved:
|
||||||
|
printerr("Failed to save configuration.")
|
||||||
|
|
||||||
|
|
||||||
|
func start_poll(poll):
|
||||||
|
prints("Starting poll", poll)
|
||||||
|
# Start listening to chat commands
|
||||||
|
# Prepare timer for automatic closing of the poll
|
||||||
|
# Move to poll results scene
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in new issue