Detailed Description

Custom tag for an inline camera. You can place your UI before and after this as normal. You must importantly set the path="" attribute to the path in the hierarchy of the camera itself. This tag also has a mask="file_path" attribute which can be used to shape the camera in interesting ways e.g. a circular minimap. You must also set the height and width of this element using either css or height="" and width="".

Inheritance diagram for PowerUI.CameraTag:
PowerUI.HtmlTagHandler Wrench.TagHandler

Public Member Functions

override string[] GetTags ()
 Returns all tags that are handled by this handler, e.g. "div" or "span". Usually there will be just one in the set but some tags may wish to have more. More...
 
override Wrench.TagHandler GetInstance ()
 Makes a new instance of this tag handler. A global instance is made of this handler so this is used to generate a new instance in an efficient way. More...
 
override bool SelfClosing ()
 Returns true if this tag has no kids and closes itself. For example <input type='text' />. Note that this method exists to make that final slash essentially optional. More...
 
override bool OnAttributeChange (string property)
 Called when an attribute of the element was changed. Returns true if the method handled the change to prevent unnecessary checks. More...
 
void ImageReady (ImagePackage package)
 Called when a mask image has been received. More...
 
void SetMask (Texture2D image)
 Applies an alpha mask over the camera itself. This can be used to shape the camera into e.g. a circle. More...
 
override void OnLayout ()
 Called during the layout pass. More...
 
- Public Member Functions inherited from PowerUI.HtmlTagHandler
void RequestLayout ()
 Requests the renderer handling this element to layout next update. More...
 
virtual bool Junk ()
 Tells the parser to not include this element in the DOM. More...
 
virtual void OnResetAllVariables ()
 Called when all variable () values must have their content reloaded. More...
 
virtual void OnResetVariable (string name)
 Called when the named variable variable () values must have its content reloaded. More...
 
virtual void OnRenderPass ()
 Called during a layout event on only the focused element. More...
 
virtual void HeightChanged ()
 Called when the fixed height of this element changes. More...
 
virtual void WidthChanged ()
 Called when the width of this element changes. More...
 
virtual void OnFocus ()
 Called when this element comes into focus. More...
 
virtual void OnBlur ()
 Called when this element becomes unfocused. More...
 
virtual void OnLoaded (string objectLoaded)
 Called when this elements content has been loaded. Used by e.g. iframe or img. More...
 
virtual void OnKeyPress (UIEvent pressEvent)
 Called on the focused element when a key is pressed or released. More...
 
virtual void OnMouseMove (UIEvent moveEvent)
 Called on the focused element when the mouse is moved. More...
 
virtual bool OnClick (UIEvent clickEvent)
 Called when the element is clicked (or the mouse is released over it). More...
 
virtual KeyboardMode OnShowMobileKeyboard ()
 Called when PowerUI attempts to display the mobile keyboard (only called on mobile platforms). More...
 
virtual void OnChildrenLoaded ()
 Called when the elements kids are fully loaded. More...
 
- Public Member Functions inherited from Wrench.TagHandler
virtual void OnTagLoaded ()
 Called when the tag is instanced and the element plus its attributes and kids have been fully parsed. More...
 
virtual void OnParseContent (MLLexer lexer)
 Called when the parser is reading the content of this tag for custom reading, e.g. a script/style tag. Non-self closing tags only. Anything that's not read by this method is assumed to be a child element. More...
 

Public Attributes

Camera Camera
 The camera component iself. Set with path="hierarchy_path". More...
 
Transform Mask
 The transform of the mask, if there is one. Set with mask="file_path". More...
 
float DepthFactor
 The depth factor of a perspective camera. More...
 
float FieldOfView
 The field of view of a perspective camera. More...
 
- Public Attributes inherited from PowerUI.HtmlTagHandler
bool IsIsolated
 True if this element is isolated from style changes by its parent (e.g. used by iframes). More...
 
Element Element
 The element this tag handler is attached to. More...
 
bool IgnoreClick
 True if the element should ignore all clicks. More...
 
bool IsFocusable
 True if this tag is focusable. More...
 
bool IgnoreSelfClick
 Set this to true if this element should ignore clicks on itself, but not its kids (e.g. html or body). More...
 
- Public Attributes inherited from Wrench.TagHandler
int Priority
 If you define a tag handler with tags which already exist, this priority allows your tag to override the existing one optionally. All system tags have a priority of zero. More...
 
string TagExtension
 This is applied to every derivative of this tag handler. This enables tags to be grouped by file they are handling. e.g. "ui" extension and tag name "div" would become "ui-div" internally. More...
 

Properties

CameraPool MainCameraPool [get]
 Gets or creates the main UI camera pool. More...
 
Shader MaskShader [get]
 The shader used for the camera mask. More...
 

Private Member Functions

void ParentMask ()
 Parents the mask to the camera, if there is one. More...
 
void ComputeDepth ()
 Computes the depth factor for a perspective camera when it's required for a mask. More...
 

Member Function Documentation

void PowerUI.CameraTag.ComputeDepth ( )
inlineprivate

Computes the depth factor for a perspective camera when it's required for a mask.

override Wrench.TagHandler PowerUI.CameraTag.GetInstance ( )
inlinevirtual

Makes a new instance of this tag handler. A global instance is made of this handler so this is used to generate a new instance in an efficient way.

Reimplemented from Wrench.TagHandler.

override string [] PowerUI.CameraTag.GetTags ( )
inlinevirtual

Returns all tags that are handled by this handler, e.g. "div" or "span". Usually there will be just one in the set but some tags may wish to have more.

Reimplemented from Wrench.TagHandler.

void PowerUI.CameraTag.ImageReady ( ImagePackage  package)
inline

Called when a mask image has been received.

Parameters
packageThe package holding the mask image.
override bool PowerUI.CameraTag.OnAttributeChange ( string  property)
inlinevirtual

Called when an attribute of the element was changed. Returns true if the method handled the change to prevent unnecessary checks.

Reimplemented from PowerUI.HtmlTagHandler.

override void PowerUI.CameraTag.OnLayout ( )
inlinevirtual

Called during the layout pass.

Reimplemented from PowerUI.HtmlTagHandler.

void PowerUI.CameraTag.ParentMask ( )
inlineprivate

Parents the mask to the camera, if there is one.

override bool PowerUI.CameraTag.SelfClosing ( )
inlinevirtual

Returns true if this tag has no kids and closes itself. For example <input type='text' />. Note that this method exists to make that final slash essentially optional.

Reimplemented from Wrench.TagHandler.

void PowerUI.CameraTag.SetMask ( Texture2D  image)
inline

Applies an alpha mask over the camera itself. This can be used to shape the camera into e.g. a circle.

Parameters
imageThe mask image. Originates from the mask="file_path" attribute.

Member Data Documentation

Camera PowerUI.CameraTag.Camera

The camera component iself. Set with path="hierarchy_path".

float PowerUI.CameraTag.DepthFactor

The depth factor of a perspective camera.

float PowerUI.CameraTag.FieldOfView

The field of view of a perspective camera.

Transform PowerUI.CameraTag.Mask

The transform of the mask, if there is one. Set with mask="file_path".

Property Documentation

CameraPool PowerUI.CameraTag.MainCameraPool
get

Gets or creates the main UI camera pool.

Shader PowerUI.CameraTag.MaskShader
get

The shader used for the camera mask.