28 lines
594 B
GDScript
28 lines
594 B
GDScript
extends TextureButton
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
# Connect the pressed signal to the _on_Button_pressed function
|
|
self.connect("pressed", Callable(self, "_on_Button_pressed"))
|
|
|
|
|
|
|
|
|
|
func _process(delta):
|
|
#Checks if the texture needs to be set
|
|
if Global.texture_member2:
|
|
self.texture_normal = Global.texture_member2
|
|
|
|
# Function to handle the button press
|
|
func _on_Button_pressed():
|
|
|
|
Global.currentMemberSelected = 1
|
|
|
|
Global.teamScreenVisible = false
|
|
|
|
Global.teamSelectionVisible = true
|
|
|
|
|
|
#Function to set texture of the button
|