Drag[en]gine Script Module DragonScript
1.23
|
Behavior element behavior adding a renderable Panel widget. More...
Classes | |
class | BlockContentCreator |
Factory creating renderable content using block. More... | |
interface | ContentCreator |
Create renderable panel content. More... | |
class | Instance |
Behavior instance. More... | |
Public Member Functions | |
void | addContentCreator (Block blockCreator) |
Add content creator using block. More... | |
void | addContentCreator (ContentCreator creator) |
Add content creator. More... | |
void | createContent (Instance instance) |
Create content using creators. More... | |
void | dispose () |
Dispose of behavior. More... | |
void | forEachContentCreator (Block ablock) |
Visit content creators with block with argument ContentCreator. More... | |
ECPString | getDesignerSelector () |
Designer selector to use for Panel. More... | |
ECBehaviorDynamicSkin | getDynamicSkin () |
Dynamic skin behavior. More... | |
ECPGuiTheme | getGuiTheme () |
Gui Theme to use for Panel. More... | |
ECPString | getRenderable () |
Name of renderable to create or empty string if not used. More... | |
ECPString | getRenderableSolidity () |
Name of solidity renderable to create or empty string if not used. More... | |
ECPPoint | getSize () |
Size of canvas. More... | |
ECBehaviorRenderablePanel | new (BehaviorElementClass eclass, ECBehaviorDynamicSkin dynamicSkin) |
Create behavior element class. More... | |
ECBehaviorRenderablePanel | new (BehaviorElementClass eclass, ECBehaviorDynamicSkin dynamicSkin, Loaders loaders) |
ECBehaviorRenderablePanel | new (BehaviorElementClass eclass, ECBehaviorDynamicSkin dynamicSkin, Loaders loaders, String id) |
ECBehaviorRenderablePanel | new (BehaviorElementClass eclass, ECBehaviorDynamicSkin dynamicSkin, Loaders loaders, String id, String prefix) |
ECBehaviorRenderablePanel | new (BehaviorElementClass eclass, ECBehaviorDynamicSkin dynamicSkin, String id) |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
void | assignInstanceIndex (int instanceIndex) |
Assign instance index. More... | |
String | getBehaviorID () |
Unique identifier of behavior. More... | |
String | getID () |
Identifier. More... | |
int | getInstanceIndex () |
Instance index. More... | |
void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
Load instance data of another behavior. More... | |
bool | supportsBehaviorID (String identifier) |
Behavior supports loading instance data of another behavior. More... | |
Public Member Functions inherited from Dragengine.Scenery.ECBehavior | |
ECBehaviorInstance | createInstance (BehaviorElement element) |
Create Behavior instance. More... | |
Static Public Member Functions | |
static ECBehaviorRenderablePanel | getBehaviorIn (BehaviorElementClass eclass) |
Get behavior in element class or null if absent. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
DefaultECBehavior | new (BehaviorElementClass eclass) |
Create default composeable behavior with empty identifier. More... | |
DefaultECBehavior | new (BehaviorElementClass eclass, String id) |
Create default composeable behavior. More... | |
void | setBehaviorID (String identifier) |
Set behavior identifier. More... | |
void | useClassNameAsBehaviorID () |
Set behavior identifier to "<class-name>:<identifier>". More... | |
void | useFullyQualifiedClassNameAsBehaviorID () |
Set behavior identifier to "<fully-qualified-class-name>:<identifier>". More... | |
Behavior element behavior adding a renderable Panel widget.
This behavior is useful for models with a complex dynamic texture where the content of the texture is provided by a Panel widget. Multiple other behaviors can add their content Widget to the Panel separating logic for reuse. Using ECBehaviorRenderablePanel instead of ECBehaviorRenderableCanvas allows to use the full power of the GUI ToolKit including using GuiThemes to create complex content easily.
The default layout for the Panel is StackLayout. The default gui theme is "/shareddata/guithemes/modern/modern.guitheme.xml". The default Panel designer selector is "RenderablePanel".
To use this behavior add an ECBehaviorDynamicSkin to the element class before adding this behavior. Create ECBehaviorRenderablePanel behavior and set the dynamic skin and designer selector and GuiTheme for the Panel. Now you can add other behaviors targeting the ECBehaviorRenderablePanel to add Widget resources to.
The Panel is created with a default size of 512x512 . You can change the size using the element property to fit the texture requirements.
Multiple ECBehaviorRenderablePanel instances can be added to affect individual dynamic skin textures. The example below uses one component with one dynamic skin to two individual renderables named "content1" and "content2" each allowing to be individiaully filled with content by different behaviors.
Element class properties have the prefix "renderablePanel{(id)}.".
This behavior does not require the element class to be persistable (setPersistable).
Using the "renderableSolidity" parameter an additional renderable can be defined. If used this renderable is set up to contain a CanvasCanvasView using the regular renderable CanvasView as input using a ColorMatrix to convert the transparency to a grayscale image. This can then be used to create transparent HUD displays or holographic displays with fully or partiall transparent content.
void Dragengine.Scenery.ECBehaviorRenderablePanel.addContentCreator | ( | Block | blockCreator | ) |
void Dragengine.Scenery.ECBehaviorRenderablePanel.addContentCreator | ( | ContentCreator | creator | ) |
Add content creator.
void Dragengine.Scenery.ECBehaviorRenderablePanel.createContent | ( | Instance | instance | ) |
Create content using creators.
void Dragengine.Scenery.ECBehaviorRenderablePanel.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
void Dragengine.Scenery.ECBehaviorRenderablePanel.forEachContentCreator | ( | Block | ablock | ) |
Visit content creators with block with argument ContentCreator.
|
static |
Get behavior in element class or null if absent.
Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorComponent.
ECPString Dragengine.Scenery.ECBehaviorRenderablePanel.getDesignerSelector | ( | ) |
Designer selector to use for Panel.
ECBehaviorDynamicSkin Dragengine.Scenery.ECBehaviorRenderablePanel.getDynamicSkin | ( | ) |
Dynamic skin behavior.
ECPGuiTheme Dragengine.Scenery.ECBehaviorRenderablePanel.getGuiTheme | ( | ) |
Gui Theme to use for Panel.
ECPString Dragengine.Scenery.ECBehaviorRenderablePanel.getRenderable | ( | ) |
Name of renderable to create or empty string if not used.
ECPString Dragengine.Scenery.ECBehaviorRenderablePanel.getRenderableSolidity | ( | ) |
Name of solidity renderable to create or empty string if not used.
If not empty the solidity renderable is set to contain the transparency of the regular renderable converted to grayscale image. This can be used to create HUD displays or holographic displays where content is fully or partially transparent.
ECPPoint Dragengine.Scenery.ECBehaviorRenderablePanel.getSize | ( | ) |
Size of canvas.
ECBehaviorRenderablePanel Dragengine.Scenery.ECBehaviorRenderablePanel.new | ( | BehaviorElementClass | eclass, |
ECBehaviorDynamicSkin | dynamicSkin | ||
) |
Create behavior element class.
ECBehaviorRenderablePanel Dragengine.Scenery.ECBehaviorRenderablePanel.new | ( | BehaviorElementClass | eclass, |
ECBehaviorDynamicSkin | dynamicSkin, | ||
Loaders | loaders | ||
) |
ECBehaviorRenderablePanel Dragengine.Scenery.ECBehaviorRenderablePanel.new | ( | BehaviorElementClass | eclass, |
ECBehaviorDynamicSkin | dynamicSkin, | ||
Loaders | loaders, | ||
String | id | ||
) |
ECBehaviorRenderablePanel Dragengine.Scenery.ECBehaviorRenderablePanel.new | ( | BehaviorElementClass | eclass, |
ECBehaviorDynamicSkin | dynamicSkin, | ||
Loaders | loaders, | ||
String | id, | ||
String | prefix | ||
) |
ECBehaviorRenderablePanel Dragengine.Scenery.ECBehaviorRenderablePanel.new | ( | BehaviorElementClass | eclass, |
ECBehaviorDynamicSkin | dynamicSkin, | ||
String | id | ||
) |