godot-psd-training/UI/psl/button_model.gd

18 lines
287 B
GDScript3
Raw Normal View History

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