Public repository for MUR pre alpha
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.

45 lines
1.0 KiB

  1. extends Control
  2. onready var game_tab = find_node("game")
  3. onready var controls_tab = find_node("controls")
  4. onready var graphics_tab = find_node("graphics")
  5. onready var system_tab = find_node("system")
  6. func _ready():
  7. get_node("menu/back").connect("pressed",self,"_on_back_pressed")
  8. system_tab.connect("locale_changed", self, "on_locale_changed")
  9. func _draw():
  10. game_tab.grab_focus()
  11. func _on_back_pressed():
  12. queue_free()
  13. if get_parent().has_node("ingame_menu"):
  14. get_parent().get_node("ingame_menu").show()
  15. get_tree().get_root().get_node("main_menu").hide()
  16. elif get_tree().get_root().has_node("main_menu"):
  17. get_tree().get_root().get_node("main_menu").show()
  18. func on_locale_changed():
  19. game_tab.set_name(tr("GAME"))
  20. controls_tab.set_name(tr("CONTROLS"))
  21. graphics_tab.set_name(tr("GRAPHICS"))
  22. system_tab.set_name(tr("SYSTEM"))
  23. func _on_save_pressed():
  24. _on_apply_pressed()
  25. _on_back_pressed()
  26. func _on_apply_pressed():
  27. game_tab.apply()
  28. graphics_tab.apply()
  29. controls_tab.apply()
  30. system_tab.apply()
  31. config.save()
  32. config_apply.apply_settings()