Events - TerraUI/TerraUI GitHub Wiki
Events
TerraUI implements some custom event handler types.
Delegates
UIEventHandler
- Parameters: UIObject
A generic handler that can be used for a number of things, but is primarily for GotFocus and LostFocus.
MouseClickEventHandler
- Parameters: UIObject, MouseButtonEventArgs
Used when the mouse is clicked over the UIObject.
MouseButtonEventHandler
- Parameters: UIObject, MouseButtonEventArgs
Used when a mouse button is pressed or released over the UIObject. Allows finer control over what happens when a UIObject is clicked.
MouseEventHandler
- Parameters: UIObject, MouseEventArgs
Used when the mouse intersects the UIObject.
DrawHandler
- Parameters: UIObject, SpriteBatch
Used to control when and how a UIObject is drawn.
ConditionHandler
- Parameters: Item
Used to control what items can go into a UIItemSlot.
EventArgs
ValueChangedEventArgs
- Properties: T PreviousValue, T Value
Used when the text or integer value of a UIObject is changed. Has a generic type.
MouseButtonEventArgs
- Properties: MouseButtons Button, Vector2 Position
Used when a mouse button is pressed or released over a UIObject.
MouseEventArgs
- Properties: Vector2 Position
Used when the mouse intersects the UIObject.