greeting_screen.gd 756 B

12345678910111213141516171819202122232425262728293031
  1. extends Node2D
  2. # Declare member variables here. Examples:
  3. # var a = 2
  4. # var b = "text"
  5. # Called when the node enters the scene tree for the first time.
  6. func _ready():
  7. $"PanelContainer/HBoxContainer/register".connect("pressed",self,'on_register_clicked')
  8. $"PanelContainer/HBoxContainer/login".connect("pressed",self,'on_login_clicked')
  9. pass # Replace with function body.
  10. func on_register_clicked():
  11. $Register.visible = true
  12. $PanelContainer.visible = false
  13. func on_login_clicked():
  14. $Login.visible = true
  15. $PanelContainer.visible = false
  16. func activate():
  17. $Register.visible = false
  18. $Login.visible = false
  19. $PanelContainer.visible = true
  20. # Called every frame. 'delta' is the elapsed time since the previous frame.
  21. #func _process(delta):
  22. # pass