Public Member Functions | |
void | AddControl (IUIObject obj) |
Adds a control to be processed by the screen. | |
void | RemoveControl (IUIObject obj) |
Removes a control from being processed by the screen. | |
void | SetScreenCamera (Camera cam) |
Sets the camera used for this screen. | |
void | SetControlParent (GameObject go) |
Sets the common parent object of the controls being rendered to the screen. Setting this will cause any newly created controls in the screen to get properly setup. | |
void | RenderFrame () |
Renders a single frame of the screen. | |
void | ForceOn () |
Forces the screen to continuously update. | |
void | OnInput (POINTER_INFO ptr) |
This is where input handling code should go in any derived class. | |
void | SetInputDelegate (EZInputDelegate del) |
Sets the method to be called when input occurs (input is forwarded from OnInput()). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddInputDelegate() instead, or RemoveInputDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates. | |
void | AddInputDelegate (EZInputDelegate del) |
Adds a method to be called when input occurs (input is forwarded from OnInput()). | |
void | RemoveInputDelegate (EZInputDelegate del) |
Removes a method added with AddInputDelegate(). | |
void | SetValueChangedDelegate (EZValueChangedDelegate del) |
Sets the method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddValueChangedDelegate() instead, or RemoveValueChangedDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates. | |
void | AddValueChangedDelegate (EZValueChangedDelegate del) |
Adds a method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved). | |
void | RemoveValueChangedDelegate (EZValueChangedDelegate del) |
Removes a method added with AddValueChangedDelegate(). | |
void | CancelDrag () |
Cancels any pending drag and drop operation. | |
void | AddDragDropDelegate (EZDragDropDelegate del) |
Adds a delegate to be called with drag and drop notifications. | |
void | RemoveDragDropDelegate (EZDragDropDelegate del) |
Removes a delegate from the list of those to be called with drag and drop notifications. | |
void | SetDragDropDelegate (EZDragDropDelegate del) |
Sets the delegate to be called with drag and drop notifications. NOTE: This will replace any previously registered delegates. | |
Public Attributes | |
Camera | screenCamera |
The camera that is rendering the controls for our "screen". | |
LayerMask | layerMask = -1 |
Mask used to filter out what controls will are checked for input. | |
float | rayDepth = float.PositiveInfinity |
The distance from the screen camera that input should "reach". | |
bool | processPointerInfo = true |
When set to true, the pointer information sent to the controls in the "screen" will be intercepted first and processed so that coordinates, etc, are correct in the context of the "screen". This is recommended if you are using scroll lists or any custom input delegates that need to have accurate input delta or coordinate information that is accurate relative to the screen camera. | |
GameObject | controlParent |
This only needs to be assigned if the processPointInfo option is set to true. This points to the common parent object of all the controls being rendered to this "screen". | |
bool | onlyRenderWhenNeeded = false |
This setting only applies if processPointerInfo is set to true. When enabled, the render texture will only be updated when the screen detects input to one of the controls on the screen. Otherwise, the "screen camera" is deactivated until new input is detected. | |
float | renderTimeout = 0 |
This setting only applies if onlyRenderWhenNeeded is enabled. This setting determines how many seconds to wait after the pointer has stopped interacting with a control before the screen camera is deactivated. A value of 0 waits until the next frame. | |
Properties | |
bool | controlIsEnabled [get, set] |
Controls whether this control is in an enabled state or not. If it is not, input is not processed. This can also be used to cause a control to take on a "grayed out" appearance when disabled. | |
bool | DetargetOnDisable [get, set] |
When set to true, the control will instruct any pointers which have it as their target to de-target them. Use this if you are deactivating a control and want no input to go to it. It is strongly recommended NOT to use this feature on any control that appears in a scroll list, or else you may be unable to scroll past the edge of the list's viewable area. | |
object | Data [get, set] |
Holds "boxed" data for the control. This can be used to associate any object or value with the control for later reference and use. | |
bool | IsDraggable [get, set] |
Indicates whether the object can be dragged as part of a drag & drop operation. | |
LayerMask | DropMask [get, set] |
A mask which can be used to make the object only be "droppable" on objects in a certain layer. NOTE: This mask is combined with the camera's mask. | |
bool | IsDragging [get, set] |
Indicates whether the object is being dragged as part of a drag & drop operation. Setting this value to false while the object is being dragged will cause the drag and drop operation to be cancelled. | |
GameObject | DropTarget [get, set] |
The GameObject over which the object being dragged is hovering and will attempt to be dropped if it let go. | |
bool | DropHandled [get, set] |
In the context of a drag & drop operation, this indicates whether the drop action was handled. If this is not set to true in response to a Dropped message sent to OnEZDragDrop(), the drop will be considered to be unhandled and will result in a cancelled drop, causing the dragged object to return to its original position. | |
float | DragOffset [get, set] |
The distance an object being dragged and dropped should be offset toward the camera to ensure it hovers above other objects and controls in the scene. | |
EZAnimation.EASING_TYPE | CancelDragEasing [get, set] |
The type of easing to use to animate the object back to its starting position when a drag operation is cancelled. | |
float | CancelDragDuration [get, set] |
The duration of the easing animation when a drag and drop operation is cancelled. |
Class that lets a surface act as a proxy for controls elsewhere in the scene being rendered to texture and mapped onto this surface. It's like putting a virtual screen onto an object in the scene, hence the name.
void UIVirtualScreen.AddControl | ( | IUIObject | obj | ) |
Adds a control to be processed by the screen.
obj | The control to be processed. |
void UIVirtualScreen.AddDragDropDelegate | ( | EZDragDropDelegate | del | ) |
Adds a delegate to be called with drag and drop notifications.
del | The delegate to add. |
Implements IEZDragDrop.
void UIVirtualScreen.AddInputDelegate | ( | EZInputDelegate | del | ) |
void UIVirtualScreen.AddValueChangedDelegate | ( | EZValueChangedDelegate | del | ) |
Adds a method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved).
del | A method that conforms to the EZValueChangedDelegate pattern. |
Implements IUIObject.
void UIVirtualScreen.CancelDrag | ( | ) |
Cancels any pending drag and drop operation.
Implements IEZDragDrop.
void UIVirtualScreen.ForceOn | ( | ) |
Forces the screen to continuously update.
void UIVirtualScreen.OnInput | ( | POINTER_INFO | ptr | ) |
This is where input handling code should go in any derived class.
ptr | POINTER_INFO struct that contains information on the pointer that caused the event, as well as the event that occurred. |
Implements IUIObject.
void UIVirtualScreen.RemoveControl | ( | IUIObject | obj | ) |
Removes a control from being processed by the screen.
obj | The object to be removed. |
void UIVirtualScreen.RemoveDragDropDelegate | ( | EZDragDropDelegate | del | ) |
Removes a delegate from the list of those to be called with drag and drop notifications.
del | The delegate to add. |
Implements IEZDragDrop.
void UIVirtualScreen.RemoveInputDelegate | ( | EZInputDelegate | del | ) |
Removes a method added with AddInputDelegate().
del | A method that conforms to the EZInputDelegate pattern. |
Implements IUIObject.
void UIVirtualScreen.RemoveValueChangedDelegate | ( | EZValueChangedDelegate | del | ) |
Removes a method added with AddValueChangedDelegate().
del | A method that conforms to the EZValueChangedDelegate pattern. |
Implements IUIObject.
void UIVirtualScreen.RenderFrame | ( | ) |
Renders a single frame of the screen.
void UIVirtualScreen.SetControlParent | ( | GameObject | go | ) |
Sets the common parent object of the controls being rendered to the screen. Setting this will cause any newly created controls in the screen to get properly setup.
go |
void UIVirtualScreen.SetDragDropDelegate | ( | EZDragDropDelegate | del | ) |
Sets the delegate to be called with drag and drop notifications. NOTE: This will replace any previously registered delegates.
del | The delegate to add. |
Implements IEZDragDrop.
void UIVirtualScreen.SetInputDelegate | ( | EZInputDelegate | del | ) |
Sets the method to be called when input occurs (input is forwarded from OnInput()). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddInputDelegate() instead, or RemoveInputDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.
del | A method that conforms to the EZInputDelegate pattern. |
Implements IUIObject.
void UIVirtualScreen.SetScreenCamera | ( | Camera | cam | ) |
Sets the camera used for this screen.
cam | The camera used for the screen. |
void UIVirtualScreen.SetValueChangedDelegate | ( | EZValueChangedDelegate | del | ) |
Sets the method to be called when the value of a control changes (such as a checkbox changing from false to true, or a slider being moved). NOTE: This will replace any and all delegates which have been set or added previously. If you are unsure if any delegates are already registered, use AddValueChangedDelegate() instead, or RemoveValueChangedDelegate() to unset a previously registered delegate. Only use this when you are sure you want to replace all previously registered delegates.
del | A method that conforms to the EZValueChangedDelegate pattern. |
Implements IUIObject.
GameObject UIVirtualScreen.controlParent |
This only needs to be assigned if the processPointInfo option is set to true. This points to the common parent object of all the controls being rendered to this "screen".
LayerMask UIVirtualScreen.layerMask = -1 |
Mask used to filter out what controls will are checked for input.
bool UIVirtualScreen.onlyRenderWhenNeeded = false |
This setting only applies if processPointerInfo is set to true. When enabled, the render texture will only be updated when the screen detects input to one of the controls on the screen. Otherwise, the "screen camera" is deactivated until new input is detected.
bool UIVirtualScreen.processPointerInfo = true |
When set to true, the pointer information sent to the controls in the "screen" will be intercepted first and processed so that coordinates, etc, are correct in the context of the "screen". This is recommended if you are using scroll lists or any custom input delegates that need to have accurate input delta or coordinate information that is accurate relative to the screen camera.
float UIVirtualScreen.rayDepth = float.PositiveInfinity |
The distance from the screen camera that input should "reach".
float UIVirtualScreen.renderTimeout = 0 |
This setting only applies if onlyRenderWhenNeeded is enabled. This setting determines how many seconds to wait after the pointer has stopped interacting with a control before the screen camera is deactivated. A value of 0 waits until the next frame.
Camera UIVirtualScreen.screenCamera |
The camera that is rendering the controls for our "screen".
float UIVirtualScreen.CancelDragDuration [get, set] |
The duration of the easing animation when a drag and drop operation is cancelled.
Implements IEZDragDrop.
EZAnimation.EASING_TYPE UIVirtualScreen.CancelDragEasing [get, set] |
The type of easing to use to animate the object back to its starting position when a drag operation is cancelled.
Implements IEZDragDrop.
bool UIVirtualScreen.controlIsEnabled [get, set] |
Controls whether this control is in an enabled state or not. If it is not, input is not processed. This can also be used to cause a control to take on a "grayed out" appearance when disabled.
Implements IUIObject.
object UIVirtualScreen.Data [get, set] |
Holds "boxed" data for the control. This can be used to associate any object or value with the control for later reference and use.
Implements IEZDragDrop.
bool UIVirtualScreen.DetargetOnDisable [get, set] |
When set to true, the control will instruct any pointers which have it as their target to de-target them. Use this if you are deactivating a control and want no input to go to it. It is strongly recommended NOT to use this feature on any control that appears in a scroll list, or else you may be unable to scroll past the edge of the list's viewable area.
Implements IUIObject.
float UIVirtualScreen.DragOffset [get, set] |
The distance an object being dragged and dropped should be offset toward the camera to ensure it hovers above other objects and controls in the scene.
Implements IEZDragDrop.
bool UIVirtualScreen.DropHandled [get, set] |
In the context of a drag & drop operation, this indicates whether the drop action was handled. If this is not set to true in response to a Dropped message sent to OnEZDragDrop(), the drop will be considered to be unhandled and will result in a cancelled drop, causing the dragged object to return to its original position.
Implements IEZDragDrop.
LayerMask UIVirtualScreen.DropMask [get, set] |
A mask which can be used to make the object only be "droppable" on objects in a certain layer. NOTE: This mask is combined with the camera's mask.
Implements IEZDragDrop.
GameObject UIVirtualScreen.DropTarget [get, set] |
The GameObject over which the object being dragged is hovering and will attempt to be dropped if it let go.
Implements IEZDragDrop.
bool UIVirtualScreen.IsDraggable [get, set] |
Indicates whether the object can be dragged as part of a drag & drop operation.
Implements IEZDragDrop.
bool UIVirtualScreen.IsDragging [get, set] |
Indicates whether the object is being dragged as part of a drag & drop operation. Setting this value to false while the object is being dragged will cause the drag and drop operation to be cancelled.
Implements IEZDragDrop.