Base class for any property of an element that can be visually displayed, e.g. backgrounds and borders.
Public Member Functions | |
DisplayableProperty (Element element) | |
Creates a new displayable property for the given element. More... | |
void | SetVisibility (bool visible) |
Call this when the visibility of this property as a whole changes. More... | |
void | SetOverlayColour () |
Sets the overlay colour from the elements colour overlay property. More... | |
void | ColourChanged () |
Call this when any colour of this property has changed. More... | |
virtual void | OnBatchDestroy () |
Called when the isolation batch for this property gets removed. More... | |
virtual void | SetOverlayColour (Color colour) |
Called to apply the given colour overlay to this property. More... | |
void | Change (string property, Value newValue) |
Called when a named css property changes. More... | |
void | ClearBlocks () |
Clears all mesh blocks that this property has allocated. More... | |
void | WentOffScreen () |
Vector3 | MapPX (float x, float y, float z) |
Maps the given pixel location to a world location. More... | |
void | Render () |
Make this property visible by forcing it to redraw. More... | |
void | RequestPaint () |
Requests for a paint event to occur. Note that paint events are more efficient than a layout as they only refresh the mesh colours and uvs rather than the whole mesh. More... | |
void | RequestLayout () |
Requests for a layout event to occur. Note that paint events are more efficient than a layout as they only refresh the mesh colours and uvs rather than the whole mesh. More... | |
virtual void | Paint () |
Called when a paint event occurs. Paint events don't relocate the whole UI so are quick and efficient. More... | |
MeshBlock | Add () |
Allocates a new mesh block for this property to use. Mesh blocks are the core of how PowerUI displays content. More... | |
void | Transform (Transformation topTransform) |
Transforms all the blocks that this property has allocated. Note that transformations are a post process. More... | |
void | ApplyTransform () |
Applies any transforms (rotate,scale etc) now. Note that tranforms are post-processes so they are very fast and mostly done by paint events. More... | |
void | Isolate () |
Isolates this property from the rest of the UI such that it can have a custom mesh/shader/texture etc. More... | |
void | Include () |
Reverses PowerUI.Css.DisplayableProperty.Isolate by re-including this property in the main UI batch. More... | |
bool | IsIsolated () |
Checks if this is an isolated property - that's one which is seperate and takes its own drawcall. More... | |
void | SetupBatch (TextureAtlas graphics, TextureAtlas font) |
AtlasLocation | RequireImage (AtlasEntity image) |
Public Attributes | |
bool | Visible |
True if this is currently visible on screen. More... | |
bool | Changed |
True if this property has changed its appearance. More... | |
bool | Isolated |
True if this property is isolated and has a seperate mesh and material from everything else. More... | |
int | BlockCount |
The number of mesh blocks that this property has allocated. More... | |
Element | Element |
The parent element that this is a property of. More... | |
MeshBlock | FirstBlock |
The first mesh block that this property has allocated. This is the head of a linked list. More... | |
bool | GotBatchAlready |
Only applies to Isolated properties. Set to true when this property has allocated a UIBatch on the current layout. More... | |
Protected Member Functions | |
virtual bool | NowOnScreen () |
Called when this element goes on screen. More... | |
virtual void | NowOffScreen () |
Called when this element goes off screen (or is removed from the DOM). More... | |
virtual void | OnChange (string property, Value newValue) |
Called when a named css property changes. More... | |
virtual void | Layout () |
Called when a layout event occurs. Layout events relocate the whole UI so should be used less frequently than a paint event. More... | |
Properties | |
bool | Paintable [get] |
Checks if this property can be repainted. More... | |
|
inline |
Creates a new displayable property for the given element.
|
inline |
Allocates a new mesh block for this property to use. Mesh blocks are the core of how PowerUI displays content.
|
inline |
Applies any transforms (rotate,scale etc) now. Note that tranforms are post-processes so they are very fast and mostly done by paint events.
|
inline |
Called when a named css property changes.
property | The css property that changed. |
newValue | The properties new value. It may also be null. |
|
inline |
Clears all mesh blocks that this property has allocated.
|
inline |
Call this when any colour of this property has changed.
|
inline |
Reverses PowerUI.Css.DisplayableProperty.Isolate by re-including this property in the main UI batch.
|
inline |
Checks if this is an isolated property - that's one which is seperate and takes its own drawcall.
|
inline |
Isolates this property from the rest of the UI such that it can have a custom mesh/shader/texture etc.
|
inlineprotectedvirtual |
Called when a layout event occurs. Layout events relocate the whole UI so should be used less frequently than a paint event.
Reimplemented in PowerUI.Css.TextRenderingProperty, PowerUI.Css.BackgroundImage, PowerUI.Css.BorderProperty, PowerUI.Css.BackgroundColour, and PowerUI.Css.RoundBorderInverseProperty.
|
inline |
Maps the given pixel location to a world location.
x | The x location of the pixel from the left of the screen. |
y | The y location of the pixel from the top of the screen. |
z | The depth of the pixel (already in world units). |
|
inlineprotectedvirtual |
Called when this element goes off screen (or is removed from the DOM).
Reimplemented in PowerUI.Css.TextRenderingProperty, and PowerUI.Css.BackgroundImage.
|
inlineprotectedvirtual |
Called when this element goes on screen.
Reimplemented in PowerUI.Css.TextRenderingProperty, and PowerUI.Css.BackgroundImage.
|
inlinevirtual |
Called when the isolation batch for this property gets removed.
Reimplemented in PowerUI.Css.BackgroundImage.
|
inlineprotectedvirtual |
Called when a named css property changes.
property | The css property that changed. |
newValue | The properties new value. It may also be null. |
|
inlinevirtual |
Called when a paint event occurs. Paint events don't relocate the whole UI so are quick and efficient.
Reimplemented in PowerUI.Css.TextRenderingProperty, PowerUI.Css.BackgroundImage, PowerUI.Css.BorderProperty, PowerUI.Css.BackgroundColour, and PowerUI.Css.RoundBorderInverseProperty.
|
inline |
Make this property visible by forcing it to redraw.
|
inline |
Requests for a layout event to occur. Note that paint events are more efficient than a layout as they only refresh the mesh colours and uvs rather than the whole mesh.
|
inline |
Requests for a paint event to occur. Note that paint events are more efficient than a layout as they only refresh the mesh colours and uvs rather than the whole mesh.
|
inline |
|
inline |
Sets the overlay colour from the elements colour overlay property.
|
inlinevirtual |
Called to apply the given colour overlay to this property.
colour | The colour overlay to apply. |
Reimplemented in PowerUI.Css.TextRenderingProperty, PowerUI.Css.BorderProperty, PowerUI.Css.BackgroundImage, PowerUI.Css.BackgroundColour, and PowerUI.Css.RoundBorderInverseProperty.
|
inline |
|
inline |
Call this when the visibility of this property as a whole changes.
|
inline |
Transforms all the blocks that this property has allocated. Note that transformations are a post process.
topTransform | The transform that should be applied to this property. |
|
inline |
int PowerUI.Css.DisplayableProperty.BlockCount |
The number of mesh blocks that this property has allocated.
bool PowerUI.Css.DisplayableProperty.Changed |
True if this property has changed its appearance.
Element PowerUI.Css.DisplayableProperty.Element |
The parent element that this is a property of.
MeshBlock PowerUI.Css.DisplayableProperty.FirstBlock |
The first mesh block that this property has allocated. This is the head of a linked list.
bool PowerUI.Css.DisplayableProperty.GotBatchAlready |
Only applies to Isolated properties. Set to true when this property has allocated a UIBatch on the current layout.
bool PowerUI.Css.DisplayableProperty.Isolated |
True if this property is isolated and has a seperate mesh and material from everything else.
bool PowerUI.Css.DisplayableProperty.Visible |
True if this is currently visible on screen.
|
get |
Checks if this property can be repainted.