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.

23 lines
1.0 KiB

  1. extends Tabs
  2. func _ready():
  3. find_node("fullscreen").set_pressed(config.get_value("graphics","fullscreen", true))
  4. find_node("light").set_pressed(config.get_value("graphics","light", false))
  5. find_node("shadows").set_pressed(config.get_value("graphics","shadows", false))
  6. find_node("shadows").set_disabled(not find_node("light").is_pressed())
  7. for resolution in config.RESOLUTIONS:
  8. find_node("resolution").add_item(str(resolution.x) + " * " + str(resolution.y))
  9. find_node("resolution").select(config.RESOLUTIONS.find(config.get_value("graphics","resolution", config.RESOLUTIONS[0])))
  10. func apply():
  11. config.set_value("graphics","resolution",config.RESOLUTIONS[find_node("resolution").get_selected()])
  12. config.set_value("graphics","fullscreen",find_node("fullscreen").is_pressed())
  13. config.set_value("graphics","light",find_node("light").is_pressed())
  14. config.set_value("graphics","shadows",find_node("shadows").is_pressed())
  15. func _on_light_toggled(button_pressed):
  16. find_node("shadows").set_disabled(not button_pressed)