Button

Buttonはクリック可能な基本的なインタラクティブ要素です。

UIButton YKLayout.Button(string text, Action action)

引数

引数説明
textstringボタンに表示するテキスト
actionActionボタンを押下した時のアクション

サンプル

public override void OnLayout()
{
    Button("ボタン1", () =>
    {
        Debug.Log("Pressed!");
    });
}