gui.gd 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. extends Control
  2. var fov_val=70
  3. var ppoff=false
  4. func dummy_init():
  5. fov_val=70
  6. ppoff=false
  7. func _ready():
  8. disable_refl(true)
  9. func _on_FOV_value_changed(value):
  10. fov_val=value
  11. onready var gui_c=get_tree().get_root().get_node("scene/gui_c")
  12. onready var global_v=get_tree().get_root().get_node("scene/main_screen/main_vp/scene")
  13. onready var post_p=get_tree().get_root().get_node("scene/main_screen")
  14. onready var main_vp=get_tree().get_root().get_node("scene/main_screen/main_vp")
  15. func _on_Ok_pressed():
  16. gui_c.set_visible(false)
  17. gui_c.get_node("vp").set_disable_input(true)
  18. gui_c.get_node("vp").set_update_mode(Viewport.UPDATE_DISABLED)
  19. global_v.conf_clicked=false
  20. post_p.material.set("shader_param/minif",global_v.conf_clicked)
  21. global_v.get_node("conf_group/conf/StaticBody").mouse_out_event()
  22. func _on_PP_toggled(button_pressed):
  23. ppoff=button_pressed
  24. post_p.ppoff=ppoff
  25. onready var cube_cameras=get_tree().get_root().get_node("scene/main_screen/main_vp/scene/cube_vp")
  26. onready var sky_b=get_tree().get_root().get_node("scene/Sky/Sprite")
  27. func _on_panorama_toggled(button_pressed):
  28. sky_b.material.set("shader_param/disable_panorama",button_pressed)
  29. post_p.disable_panorama=button_pressed
  30. for a in range(6):
  31. cube_cameras.get_child(a).set_transparent_background(button_pressed)
  32. func _on_reflection_toggled(button_pressed):
  33. post_p.disable_refl=button_pressed
  34. func disable_refl(state):
  35. if(state):
  36. for a in range(6):
  37. cube_cameras.get_child(a).set_update_mode(Viewport.UPDATE_DISABLED)
  38. else:
  39. for a in range(6):
  40. cube_cameras.get_child(a).set_update_mode(Viewport.UPDATE_ALWAYS)
  41. func _on_refl_res_value_changed(value):
  42. for a in range(6):
  43. cube_cameras.get_child(a).set_size(Vector2(value,value))
  44. func _on_MSAA_value_changed(value):
  45. main_vp.set_msaa(value)
  46. func _on_less_parts_toggled(button_pressed):
  47. global_v.set_particles(button_pressed)