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

21 lines
338 B
GDScript3
Raw Normal View History

extends VBoxContainer
##是否允许操作
var allowHandle :bool = true
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