godot-psd-training/UI/psl/button_model.gd
2024-05-06 17:28:42 +08:00

18 lines
287 B
GDScript

extends VBoxContainer
enum ButtonType{
green,# 绿色按钮
red,#红色按钮
black,#黑色按钮
}
@export var buttonType:ButtonType
@export var buttonText:String
signal clickButtonSignal(click:bool,button)
func _ready() -> void:
$Button/MarginContainer/Label.text=buttonText