Class UIButton
Provides hover, press, and click interaction for a UI rectangle.
public sealed class UIButton : Component, IDisposable
- Inheritance
-
UIButton
- Implements
- Inherited Members
Constructors
UIButton(GameObject, Game)
Provides hover, press, and click interaction for a UI rectangle.
public UIButton(GameObject gameObject, Game game)
Parameters
gameObjectGameObjectgameGame
Properties
Button
public MouseButton Button { get; set; }
Property Value
- MouseButton
Interactable
public bool Interactable { get; set; }
Property Value
IsHovered
public bool IsHovered { get; }
Property Value
IsPressed
public bool IsPressed { get; }
Property Value
Methods
OnDisable()
public override void OnDisable()
Start()
public override void Start()
Update(double)
public override void Update(double deltaTime)
Parameters
deltaTimedouble
Events
Clicked
public event Action? Clicked
Event Type
PointerEntered
public event Action? PointerEntered
Event Type
PointerExited
public event Action? PointerExited
Event Type
PressedChanged
public event Action<bool>? PressedChanged