Namespace: | Sirenix.Utilities.Editor |
Assembly: | Sirenix.Utilities.Editor |
public static class EventExtensions
true
when the user hovers the mouse over the specified rect.
public static bool IsHovering(this Event current, Rect rect)
UnityEngine.Event | current | The UnityEngine.Event. |
UnityEngine.Rect | rect | The rect the user can hover. |
System.Boolean |
|
true
when the users mouse is hovering over the specified UnityEngine.Rect
public static bool IsMouseOver(this Event current, Rect rect)
UnityEngine.Event | current | The UnityEngine.Event. |
UnityEngine.Rect | rect | The UnityEngine.Rect to check. |
System.Boolean |
|
true
when the user right clicks a rect.
public static bool OnContextClick(this Event current, Rect rect, bool useEvent = true)
UnityEngine.Event | current | The UnityEngine.Event. |
UnityEngine.Rect | rect | The rect the user can right click. |
System.Boolean | useEvent | If |
System.Boolean |
|
true
on the specified event.
public static bool OnEventType(this Event current, EventType eventType)
UnityEngine.Event | current | The UnityEngine.Event. |
UnityEngine.EventType | eventType | The required event type. |
System.Boolean |
|
true
when the user presses the specified key.
public static bool OnKeyDown(this Event current, KeyCode key, bool useEvent = true)
UnityEngine.Event | current | The UnityEngine.Event. |
UnityEngine.KeyCode | key | The key the user has to press. |
System.Boolean | useEvent | If |
System.Boolean |
|
true
when the user releases the specified key.
public static bool OnKeyUp(this Event current, KeyCode key, bool useEvent = true)
UnityEngine.Event | current | The UnityEngine.Event. |
UnityEngine.KeyCode | key | The key the user has to release. |
System.Boolean | useEvent | If |
System.Boolean |
|
true
on layout events.
public static bool OnLayout(this Event current)
UnityEngine.Event | current | The UnityEngine.Event. |
System.Boolean |
|
true
when the user left clicks a rect.
public static bool OnLeftClick(this Event current, Rect rect, bool useEvent = true)
UnityEngine.Event | current | The UnityEngine.Event. |
UnityEngine.Rect | rect | The rect the user can click. |
System.Boolean | useEvent | If |
System.Boolean |
|
true
when the user presses the specified mouse button.
public static bool OnMouseDown(this Event current, int mouseButton, bool useEvent = true)
UnityEngine.Event | current | The UnityEngine.Event. |
System.Int32 | mouseButton | The mouse button the user has to press. |
System.Boolean | useEvent | If |
System.Boolean |
|
true
when the user clicks a rect with the mouse.
public static bool OnMouseDown(this Event current, Rect rect, int mouseButton, bool useEvent = true)
UnityEngine.Event | current | The event. |
UnityEngine.Rect | rect | The rect the user can click on. |
System.Int32 | mouseButton | The button the user has to press. |
System.Boolean | useEvent | If |
System.Boolean |
|
true
whene the user moves or drags the mouse.
public static bool OnMouseMoveDrag(this Event current, bool useEvent = true)
UnityEngine.Event | current | The UnityEngine.Event. |
System.Boolean | useEvent | If |
System.Boolean |
|
true
when the user releases the specified mouse button.
public static bool OnMouseUp(this Event current, int mouseButton, bool useEvent = true)
UnityEngine.Event | current | The UnityEngine.Event. |
System.Int32 | mouseButton | The mouse button the user has to release. |
System.Boolean | useEvent | If |
System.Boolean |
|
true
when the user releases the specified mouse button over the specified rect.
public static bool OnMouseUp(this Event current, Rect rect, int mouseButton, bool useEvent = true)
UnityEngine.Event | current | The UnityEngine.Event. |
UnityEngine.Rect | rect | The rect the user has to release the mouse button over. |
System.Int32 | mouseButton | The mouse button the user has to release. |
System.Boolean | useEvent | If |
System.Boolean |
|
true
on repaint events.
public static bool OnRepaint(this Event current)
UnityEngine.Event | current | The UnityEngine.Event. |
System.Boolean |
|