Represents the background image of an element. May also be a video (pro only) or animation.
Public Member Functions | |
BackgroundImage (Element element) | |
Creates a new displayable background image for the given element. More... | |
override void | SetOverlayColour (Color colour) |
Called to apply the given colour overlay to this property. More... | |
bool | Overlaps (BackgroundImage image) |
override void | OnBatchDestroy () |
Called when the isolation batch for this property gets removed. More... | |
override void | Paint () |
Called when a paint event occurs. Paint events don't relocate the whole UI so are quick and efficient. More... | |
void | SetImage (Texture2D image) |
Applies the given image to the background. More... | |
void | SetImage (ImagePackage package) |
Manually apply an image package to the background of this element. More... | |
void | ImageReady (ImagePackage package) |
A callback used when the graphic has been loaded and is ready for display. More... | |
Public Member Functions inherited from PowerUI.Css.DisplayableProperty | |
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... | |
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... | |
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 | |
Css.Value | OffsetX |
How much to move the image over by on the x axis. % or px. More... | |
Css.Value | OffsetY |
How much to move the image over by on the y axis. % or px. More... | |
Css.Value | SizeX |
The width of the image (background-size property). More... | |
Css.Value | SizeY |
The height of the image (background-size property). More... | |
bool | RepeatX =true |
True if the image should be repeated on the x axis. More... | |
bool | RepeatY =true |
True if the image should be repeated on the y axis. More... | |
ImagePackage | Image |
The graphic to display. More... | |
bool | ForcedIsolate |
True if this image should be isolated regardless. More... | |
AtlasLocation | ImageLocation |
The location of the image on an atlas if it's on one. More... | |
FilterMode | Filtering =FilterMode.Point |
The filter mode to display the image with. More... | |
BackgroundClipping | Clipping =BackgroundClipping.BorderBox |
The clipping mode of this background image. More... | |
Public Attributes inherited from PowerUI.Css.DisplayableProperty | |
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 | |
override void | NowOffScreen () |
Called when this element goes off screen (or is removed from the DOM). More... | |
override bool | NowOnScreen () |
Called when this element goes on screen. More... | |
override 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... | |
Protected Member Functions inherited from PowerUI.Css.DisplayableProperty | |
virtual void | OnChange (string property, Value newValue) |
Called when a named css property changes. More... | |
Additional Inherited Members | |
Properties inherited from PowerUI.Css.DisplayableProperty | |
bool | Paintable [get] |
Checks if this property can be repainted. More... | |
|
inline |
Creates a new displayable background image for the given element.
The element that will have a background image applied.
|
inline |
A callback used when the graphic has been loaded and is ready for display.
|
inlineprotectedvirtual |
Called when a layout event occurs. Layout events relocate the whole UI so should be used less frequently than a paint event.
Reimplemented from PowerUI.Css.DisplayableProperty.
|
inlineprotectedvirtual |
Called when this element goes off screen (or is removed from the DOM).
Reimplemented from PowerUI.Css.DisplayableProperty.
|
inlineprotectedvirtual |
Called when this element goes on screen.
Reimplemented from PowerUI.Css.DisplayableProperty.
|
inlinevirtual |
Called when the isolation batch for this property gets removed.
Reimplemented from PowerUI.Css.DisplayableProperty.
|
inline |
|
inlinevirtual |
Called when a paint event occurs. Paint events don't relocate the whole UI so are quick and efficient.
Reimplemented from PowerUI.Css.DisplayableProperty.
|
inline |
Applies the given image to the background.
image | The image to use. |
|
inline |
Manually apply an image package to the background of this element.
|
inlinevirtual |
Called to apply the given colour overlay to this property.
colour | The colour overlay to apply. |
Reimplemented from PowerUI.Css.DisplayableProperty.
BackgroundClipping PowerUI.Css.BackgroundImage.Clipping =BackgroundClipping.BorderBox |
The clipping mode of this background image.
FilterMode PowerUI.Css.BackgroundImage.Filtering =FilterMode.Point |
The filter mode to display the image with.
bool PowerUI.Css.BackgroundImage.ForcedIsolate |
True if this image should be isolated regardless.
ImagePackage PowerUI.Css.BackgroundImage.Image |
The graphic to display.
AtlasLocation PowerUI.Css.BackgroundImage.ImageLocation |
The location of the image on an atlas if it's on one.
Css.Value PowerUI.Css.BackgroundImage.OffsetX |
How much to move the image over by on the x axis. % or px.
Css.Value PowerUI.Css.BackgroundImage.OffsetY |
How much to move the image over by on the y axis. % or px.
bool PowerUI.Css.BackgroundImage.RepeatX =true |
True if the image should be repeated on the x axis.
bool PowerUI.Css.BackgroundImage.RepeatY =true |
True if the image should be repeated on the y axis.
Css.Value PowerUI.Css.BackgroundImage.SizeX |
The width of the image (background-size property).
Css.Value PowerUI.Css.BackgroundImage.SizeY |
The height of the image (background-size property).