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/settings_game_menu.gd

17 lines
672 B
GDScript3
Raw Normal View History

extends Tabs
onready var player_settings = find_node("settings_player")
func _ready():
# game
find_node("bots").set_pressed(config.get_value("game","bots", true))
find_node("bot_difficulty").set_value(config.get_value("game","bot_difficulty", gamestate.DEFAULT_BOT_DIFFICULTY))
find_node("bot_difficulty").set_tooltip(tr("BOT_DIFFICULTY"))
func apply():
config.set_value("game","player_name",player_settings.get_name_node().get_text())
config.set_value("game","player_color",player_settings.get_color_node().color)
config.set_value("game","bots",find_node("bots").is_pressed())
config.set_value("game","bot_difficulty",find_node("bot_difficulty").get_value())