46 lines
1.1 KiB
GDScript
46 lines
1.1 KiB
GDScript
extends Control
|
|
|
|
@onready var label = $Label
|
|
|
|
signal trump
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
pass # Replace with function body.
|
|
|
|
|
|
|
|
func _on_button_heart_mouse_entered() -> void:
|
|
label.text = "Hearts"
|
|
func _on_button_heart_mouse_exited() -> void:
|
|
label.text = "Choose Trump"
|
|
|
|
func _on_button_spade_mouse_entered() -> void:
|
|
label.text = "Spades"
|
|
func _on_button_spade_mouse_exited() -> void:
|
|
label.text = "Choose Trump"
|
|
|
|
func _on_button_diamond_mouse_entered() -> void:
|
|
label.text = "Diamonds"
|
|
func _on_button_diamond_mouse_exited() -> void:
|
|
label.text = "Choose Trump"
|
|
|
|
|
|
func _on_button_club_mouse_entered() -> void:
|
|
label.text = "Clubs"
|
|
func _on_button_club_mouse_exited() -> void:
|
|
label.text = "Choose Trump"
|
|
|
|
|
|
func _on_button_heart_pressed() -> void:
|
|
trump.emit("Heart")
|
|
self.visible = false
|
|
func _on_button_spade_pressed() -> void:
|
|
trump.emit("Spade")
|
|
self.visible = false
|
|
func _on_button_diamond_pressed() -> void:
|
|
trump.emit("Diamond")
|
|
self.visible = false
|
|
func _on_button_club_pressed() -> void:
|
|
trump.emit("Club")
|
|
self.visible = false
|