Add StickGame Assets
This commit is contained in:
27
phr/StickGame/Assets/UI/PlayButton.cs
Normal file
27
phr/StickGame/Assets/UI/PlayButton.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class PlayButton : VisualElement
|
||||
{
|
||||
[UnityEngine.Scripting.Preserve]
|
||||
|
||||
public new class UxmlFactory : UxmlFactory<PlayButton> { }
|
||||
|
||||
const string styleSheetPath = "Default";
|
||||
const string ussActionButton = "PlayButton";
|
||||
public PlayButton()
|
||||
{
|
||||
styleSheets.Add(Resources.Load<StyleSheet>(styleSheetPath));
|
||||
AddToClassList(ussActionButton);
|
||||
Button actionButton = new Button() { text = "Play" };
|
||||
actionButton.clicked += ActionButtonClicked;
|
||||
Add(actionButton);
|
||||
}
|
||||
|
||||
private void ActionButtonClicked()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user