Events - TerraUI/TerraUI GitHub Wiki

Events

TerraUI implements some custom event handler types.

Delegates

UIEventHandler

A generic handler that can be used for a number of things, but is primarily for GotFocus and LostFocus.

MouseClickEventHandler

Used when the mouse is clicked over the UIObject.

MouseButtonEventHandler

Used when a mouse button is pressed or released over the UIObject. Allows finer control over what happens when a UIObject is clicked.

MouseEventHandler

Used when the mouse intersects the UIObject.

DrawHandler

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

Used when a mouse button is pressed or released over a UIObject.

MouseEventArgs

  • Properties: Vector2 Position

Used when the mouse intersects the UIObject.