Represents the result of a Physics Mode input test. These are used when a player clicks on the UI and the UI is in Physics mode or when WorldUI's are listening for input.
Public Member Functions | |
| void | SetPoint (int x, int y) |
| Sets the location the mouse was at, relative to the UI. More... | |
| void | SetRelativePoint (float x, float y) |
| Sets mouseX and mouseY from a relative 1 unit range coordinates. More... | |
| bool | RunClick (UIEvent uiEvent) |
| Runs a click with the given UI event based on where on the UI this hit occured. More... | |
| void | RunMouseOver (UIEvent mouseEvent) |
| Runs a mouse over event for the UI, if any, that this hit occured on. More... | |
| bool | FindWorldUI (Transform transform) |
| Finds and sets OnWorldUI from the given transform. If successful, Success will be true. More... | |
| void | SetElement (Element hitElement) |
| Sets the element that was clicked on. More... | |
| void | FindElement (RaycastHit hit) |
| Attempts to find the element from the set WorldUI; if there is no WorldUI, the main UI is used. This search uses the triangle of the hit to figure out exactly which element was clicked. More... | |
Public Attributes | |
| int | MouseX |
| The x location of the mouse relative to the UI from the left. More... | |
| int | MouseY |
| The y location of the mouse relative to the UI from the top. More... | |
| bool | ScreenMode |
| True if no attempt was made to resolve the element. More... | |
| WorldUI | OnWorldUI |
| The worldUI that was hit, if any. More... | |
| Element | HitElement |
| The element that was hit, if any. More... | |
Properties | |
| bool | Success [get] |
| True if this hit was successful. More... | |
| bool | InWorld [get] |
| True if this hit was on a WorldUI. More... | |
Private Attributes | |
| bool | Successful |
| True if this hit was successful. More... | |
|
inline |
|
inline |
Finds and sets OnWorldUI from the given transform. If successful, Success will be true.
|
inline |
|
inline |
Runs a mouse over event for the UI, if any, that this hit occured on.
|
inline |
Sets the element that was clicked on.
| hitElement | The element that was clicked on. |
|
inline |
Sets the location the mouse was at, relative to the UI.
| x | The x coordinate of the mouse on the screen, measured from the left. |
| y | The y coordinate of the mouse on the screen, measured from the top. |
|
inline |
Sets mouseX and mouseY from a relative 1 unit range coordinates.
| x | The relative x coordinate in the range +-0.5. |
| y | The relative y coordinate in the range +-0.5. |
| Element PowerUI.HitResult.HitElement |
The element that was hit, if any.
| int PowerUI.HitResult.MouseX |
The x location of the mouse relative to the UI from the left.
| int PowerUI.HitResult.MouseY |
The y location of the mouse relative to the UI from the top.
| WorldUI PowerUI.HitResult.OnWorldUI |
The worldUI that was hit, if any.
| bool PowerUI.HitResult.ScreenMode |
True if no attempt was made to resolve the element.
|
private |
True if this hit was successful.
|
get |
True if this hit was on a WorldUI.
|
get |
True if this hit was successful.