menu.gd 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. extends Control
  2. var texture_orig=load("res://menu_textures/orig_1.png") as Texture
  3. var texture_glow1=load("res://menu_textures/glow_1.png") as Texture
  4. var texture_glow2=load("res://menu_textures/glow_2.png") as Texture
  5. var texture_glow3=load("res://menu_textures/glow_3.png") as Texture
  6. var texture_glow4=load("res://menu_textures/glow_4.png") as Texture
  7. func _ready():
  8. pass
  9. #switch textures on state, thats logic
  10. func _on_b1_pressed():
  11. get_node("popup").popup_centered(Vector2(320,240))
  12. func _on_b1_button_down():
  13. get_node("menu_texture").texture=texture_glow4
  14. func _on_b1_button_up():
  15. get_node("menu_texture").texture=texture_orig
  16. func _on_b1_mouse_entered():
  17. get_node("menu_texture").texture=texture_glow1
  18. func _on_b1_mouse_exited():
  19. get_node("menu_texture").texture=texture_orig
  20. func _on_b2_pressed():
  21. get_node("popup").popup_centered(Vector2(320,240))
  22. func _on_b2_button_down():
  23. get_node("menu_texture").texture=texture_glow2
  24. func _on_b2_button_up():
  25. get_node("menu_texture").texture=texture_orig
  26. func _on_b2_mouse_entered():
  27. get_node("menu_texture").texture=texture_glow2
  28. func _on_b2_mouse_exited():
  29. get_node("menu_texture").texture=texture_orig
  30. func _on_b3_pressed():
  31. get_node("popup").popup_centered(Vector2(320,240))
  32. func _on_b3_button_down():
  33. get_node("menu_texture").texture=texture_glow3
  34. func _on_b3_button_up():
  35. get_node("menu_texture").texture=texture_orig
  36. func _on_b3_mouse_entered():
  37. get_node("menu_texture").texture=texture_glow3
  38. func _on_b3_mouse_exited():
  39. get_node("menu_texture").texture=texture_orig