func: Added Trump Buttons
This commit is contained in:
45
scripts/buttons_trump_select.gd
Normal file
45
scripts/buttons_trump_select.gd
Normal file
@@ -0,0 +1,45 @@
|
||||
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
|
||||
Reference in New Issue
Block a user