Component_ThreePartImage Class
A three-part image component displays an object on screen using three
sub-images: start, middle and end. The start and end will be rendered
with fixed size while the middle-part will be stretched in a way like this:
|Start-Part Fixed|<-----------Middle-Part Stretched----------->|End-Part Fixed
A three-part image is automatically added to the graphics-system
and rendered every frame until it gets disposed. It can be horizontal or
vertical.
Item Index
Methods
Properties
Methods
dispose
()
Disposes the three-part image.
onDataBundleRestore.
-
Object
-
gs.ObjectCodecContext
Called if this object instance is restored from a data-bundle. It can be used re-assign event-handler, anonymous functions, etc.
Parameters:
-
Object
Objectdata - The data-bundle
-
gs.ObjectCodecContext
Objectcontext - The codec-context.
setup
()
Setup the three-part image component. This method is automatically called by the system.
setupEventHandlers
()
Adds event-handlers for mouse/touch events
update
()
Updates the three-part image.
updateImage
()
Updates the skin-image used to construct the three-part image.
updatePadding
()
Updates the padding.
updateProperties
()
Updates the three-part image properties from the game object properties.
Properties
image
String
protected
The name of the image used to construct the three-part image.
threePartImage
gs.ThreePartImage
The native three-part image graphic object.