This repository has been archived on 2023-12-19. You can view files and clone it, but cannot push or open issues or pull requests.
MUR/scripts/menus/local_game.gd

25 lines
527 B
GDScript3
Raw Normal View History

extends Control
onready var player_settings = find_node("player_settings")
func _ready():
find_node("bots").set_pressed(config.get_value("game","bots", true))
func _draw():
find_node("start").grab_focus()
func _on_start_pressed():
var name = player_settings.get_name_node().text
var color = player_settings.get_color_node().color
var bots = find_node("bots").is_pressed()
queue_free()
server.local_game(name,color,bots)
func _on_back_pressed():
queue_free()
get_tree().get_root().get_node("main_menu").show()