Skip to main content

Examples Using Predefined Behaviors

Contents List

Thermometer Example

1. Drag&drop a Slider Control and a Text Value Control from the Controls Panel of the Toolbox to the Scene Editor or the Scene Tree.

drawing-7-1677217038.png

2. Set the Slider's Minimum to "-50,00" and the maximum to "+50,00".

drawing-7-1677217059.png

3. Change the Text Value Control's "Format Text" Property to "%d °C".

drawing-7-1677217081.png

4. Drag&drop a Forward Value Behavior (which is a Value Processing Behavior) from the Behaviors Panel of the Toolbox onto the Slider in the Scene Tree.

drawing-7-1677217098.png

This is what the Scene Tree should look like now:

drawing-7-1677217109.png

5. Select the Forward Value Behavior in the right side of the Scene Tree view. Set the Forward Value Behavior's Target Node to the Text Value Control you have added to the scene in step 1 by clicking on the magnifying glass on the right of the input field and selecting the Text Value Control in the "Choose Item" dialog.

drawing-7-1677217134.png

After that, the Forward Value Behavior's Properties will look as follows.

drawing-7-1677217146.png

6. Drag&drop a Value Behavior (which is a Value Processing Behavior) from the Behaviors Panel of the Toolbox onto the Text Value Control in the Scene Tree.

drawing-7-1677217166.png

7. Select the Value Behavior on the right side of the Scene Tree View. Set the Value Behavior's AcceptValueEvent Property to "true" by checking the checkbox.

drawing-7-1677217184.png

8. Select the "Text Value" Control in the Scene Tree Panel and drag&drop two Action on Value Behaviors (which are Value Processing Behaviors) from the Behaviors Panel of the Toolbox onto the "Receivers" of the "Value Behavior" in right side of the SceneTree Panel.

drawing-7-1677217211.png

9. Add a condition to the Action on Value Behaviors you have just added by dragging&dropping a Check processed Value Behavior (which is a Condition - Control Behavior) onto each of the Action on Value Behaviors you have just added.

drawing-7-1677217229.png

10. Configure one of the Conditions to "LowerThan 0,00" and the other one to "GreaterThan 0,00".

drawing-7-1677217255.png

11. Drag&drop a Set Color SetColor Action (which is a Action - Property Behavior) from the Toolbox view onto the Actions of each of the Action on Value Behaviors in the SceneTree.

drawing-7-1677217282.png

12. Set the color to Blue on the Action on Value Behavior with the Condition Lower Than 0,00 and set the Color to Red on the Action on Value Behavior with the Condition Greater Than 0,00.

drawing-7-1677217306.png

13. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677217319.png

14. The text color of the Text Value Control displaying the temperature in degrees celcius will turn blue once the value of the slider gets lower than zero and it will turn red once the value becomes greater than zero.

drawing-7-1677217397.png

Back to the menu


Align Pivot Example

1. Drag&drop a Group from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree. Choose the follwing two Images from the Construction Kit (in the Solution Explorer) and drag&drop them onto the Group node in the SceneTree: GaugeBmP and GaugeNeedleBmp

drawing-7-1677217510.png

2. Arrange the Controls in the SceneEditor so that "GaugeNeedleBmp" is the last entry of the Group Node in the Scene Tree.

drawing-7-1677217525.png

3. Select the "Pivot only" Translation tool in the toolbar and move the pivot of "GaugeBmP" to the center of the image and the pivot of "GaugeNeedleBmp" to the usual center of rotation of a gauge needle.

drawing-7-1677217601.png

4. Drag&drop the Align Pivot Behavior (which is a Control Behavior) from the Toolbox view onto the Group node in the SceneTree.

drawing-7-1677217632.png

5. The Align Pivot Behavior does not have any properties to set. The pivots of the Bitmap Nodes are aligned and the result can be seen in the SceneEditor: The Needle image is positioned correctly in the Gauge image.

drawing-7-1677217647.png

Don't forget to reset the Translation tool to "Pivot and Object".

drawing-7-1677217718.png

Back to the menu


Arc Align Example

1. Drag&drop a Group from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree. And add four Text Nodes to this group by dragging&dropping them onto the Group node in the SceneTree.

drawing-7-1677217869.png

2. Change the texts of the Text Nodes to "Text", "Text_1" etc. according to their names in the Scene Tree View.

drawing-7-1677217884.png

3. Drag&drop the Arc Align Behavior (which is a Control Behavior) from the Toolbox view onto the Group node in the SceneTree.

drawing-7-1677217902.png

4. Configure the Arc Align Behavior with a radius of 50 and AngleMinMax values of 0 and 90.

drawing-7-1677217920.png

5. The result can be seen in the Scene Editor view: All nodes are aligned like an arc from 0 to 90 degrees.

drawing-7-1677217929.png

Back to the menu


Enable Rendering Example

1. Drag&drop a TextButton Control from the Controls Panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677221451.png

2. Drag&drop the OnClick Behavior (which is a Control Behavior) from the Toolbox view onto the TextButton node in the SceneTree. Additionally, drag&drop the Enable Rendering Behavior (which is a Action - Property Behavior) from the Toolbox view onto the "Actions" field of the OnClick Behavior on the right side of the Scene Tree.

drawing-7-1677221472.png

3. Check the properties of the Enable Rendering Behavior. We want to change the visibility of the TextButton to invisible when it has been clicked (onClick), so the checkbox "Visible" has to remain unchecked.

drawing-7-1677221485.png

4. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677221499.png

5. When you click on the TextButton you can see in the Player, it will get invisible. The behavior of the TextButton is like the behaviors that we have configured: OnClick -> EnableRendering (not visible)

Back to the menu


Format String Example

1. Drag&drop a TextButton Control from the Controls panel and a TextNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree. Set the TextButton's Text to "Format String".

drawing-7-1677221666.png

2. Drag&drop a Value Behavior (which is a Value Processing Behavior) from the Toolbox view onto the TextNode in the SceneTree. Set the Value Behavior's "AcceptValueEvent" property to true.

drawing-7-1677221695.png

3. Drag&drop a Format String Behavior (which is a Value Processing Behavior) from the Toolbox view onto the Value Behavior's Receivers.

drawing-7-1677221725.png

4. Set the Format String Behavior's "Text" property to "Score: %0.2f", in order to represent the value as formatted string.

drawing-7-1677221738.png

5. Drag&drop a Send Value as Event Behavior (which is a Action - Property Behavior) from the Toolbox view onto the TextButton's Actions on the right side of the SceneTree view.

drawing-7-1677221762.png

6. Configure the Send Value as Event Behavior's Value property to datatype Int32 and value 10. Adjust the behavior's TargetNode by clicking on the magnifying glass on the right of the property.

drawing-7-1677221773.png

7. Set the scene's TextNode as TargetNode for the Send Value as Event Behavior: After clicking the magnifying glass in the properties panel, the "Select Item" Dialog is opened. Select the scene's TextNode and press OK.

drawing-7-1677221811.png

8. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677221826.png

9. When the TextButton is pressed, the Int32 value of 10 will be sent to the TextNode. This value is accepted by the TextNode and the behavior FormatString formats it to "Score: 10.00".

drawing-7-1677221861.png

Back to the menu


Forward Value Example
1. Drag&drop a Slider Control and a Text Value Control the Controls panel and a TextNode from the Controls Panel of the Toolbox to the Scene Editor or the Scene Tree.
drawing-7-1677222589.png

2. Position the Slider Control and Text Value Control in the Scene Editor View.

drawing-7-1677222616.png

3. Change the Text Value Control's "Format Text" Property to "Value: %d".

drawing-7-1677222688.png

4. Drag&drop a Forward Value Behavior (which is a Value Processing Behavior) from the Behaviors Panel of the Toolbox onto the Slider in the Scene Tree.

drawing-7-1677222705.png

5. Select the Forward Value Behavior in the right side of the Scene Tree view. Set the Forward Value Behavior's Target Node to the Text Value Control you have added to the scene in step 1 by clicking on the magnifying glass on the right of the input field and selecting the Text Value Control in the Choose Item dialog.

drawing-7-1677222726.png

After that, the Forward Value Behavior's Properties will look as follows.

drawing-7-1677222739.png

6. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677222755.png

7. When manipulating the slider, the Value of the Text Value Control changes according to the alteration on the slider.

drawing-7-1677222799.png

Back to the menu


Hover - Hover Leave Example

1. Drag&drop a Text Control from the Controls Panel of the Toolbox to the Scene Editor or the Scene Tree and change its text to "Hover".

drawing-7-1677223245.png

2. Drag&drop a Hover Behavior (which is a Control Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the Text Control in the SceneTree. The Handle Control State Behavior is needed in order for the Text Control to receive Input Events.

drawing-7-1677223271.png

3. Drag&drop a SetColor Behavior (which is an Action - Property Behavior) onto the Actions of the Hover Behavior on the right side of the SceneTree view.

drawing-7-1677223296.png

4. Select the Set Color Behavior and change the Color to red.

drawing-7-1677223305.png

5. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677223315.png

6. When moving the mouse over the Text Control, the text color changes to red.

drawing-7-1677223338.png

7. Drag&drop a Hover Leave Behavior (which is a Control Behavior) onto the TextNode.

drawing-7-1677223364.png

8. Drag&drop a Set Color Behavior (which is an Action - Property Behavior) onto the Actions of the HoverLeave Behavior on the right side of the SceneTree view.

drawing-7-1677223385.png

9. Select the Set Color Behavior and change the Color to green.

drawing-7-1677223403.png

10. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677223416.png

11. When moving the mouse over the Text Control, the text color changes to red (as it did before). When moving the mouse away again, the Text Control's color changes to green. Whenever you hover, it's getting red, when leaving, it's turning green.

drawing-7-1677223532.png

Back to the menu


Interpolate Value Example

1. Drag&drop a TextButton Control from the Controls panel and a TextNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree. Set the TextButton's Text to "Count to 10".

drawing-7-1677224131.png

2. Drag&drop a Value Behavior (which is a Value Processing Behavior) from the Behaviors Panel of the Toolbox onto the TextNode in the Scene Tree.

drawing-7-1677224160.png

3. Select the Value Behavior in the right side of the Scene Tree view. Set the Value Behavior's AcceptValueEvent Property to "true" by checking the checkbox.

drawing-7-1677224173.png

4. Drag&drop an Interpolate Value Behavior (which is a Value Processing Behavior) onto the Value Behavior's Receivers in the right side of the Scene Tree Panel.

drawing-7-1677224204.png

5. Select the Interpolate Value Behavior on the right side of the Scene Tree View and set the UnitsPerSecond to 1,00 in the Properties view on the bottom right.

drawing-7-1677224216.png

6. Drag&drop a Format String Behavior (which is a Value Processing Behavior) from the Toolbox onto the Interpolate Value Behavior's Receivers on the right side of the Scene Tree Panel.

drawing-7-1677224250.png

7. Select the Format String Behavior on the right side of the Scene Tree view and set the Text property to "%d" in the Properties view.

drawing-7-1677224267.png

8. Drag&drop a Send Value as Event Behavior (which is a Action - Property Behavior) from the Toolbox view onto the TextButton's Actions on the right side of the SceneTree view.

drawing-7-1677224298.png

9. Select the Send Value as Event Behavior on the right side of the Scene Tree Panel. Set the Value property to datatype "Float" and value "10" in the Properties view. Adjust the behavior's TargetNode by clicking on the magnifying glass on the right of the property.

drawing-7-1677224312.png

10. Set the scene's TextNode as TargetNode for the Send Value as Event Behavior: After clicking the magnifying glass in the properties panel, the "Select Item" Dialog is opened. Select the scene's TextNode and press OK.

drawing-7-1677224346.png

11. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677224359.png

12. When clicking on the TextButton, the value 10 gets sent to the TextNode, but the TextNode doesn't change to 10 immediately. The Interpolate Value Behavior makes the TextNode count up from 0 to 10 in one step per second.

drawing-7-1677224502.png

Back to the menu


Move Node Example

 1. Drag&drop a TextButton Control from the Controls Panel of the Toolbox to the SceneEditor or the Scene Tree and change the Text to "Move Node"

drawing-7-1677223703.png

2. Select the TextButton in the Scene Tree View and delete all Behaviors that are automatically attached to the TextButton from the right side of the Scene Tree View.

drawing-7-1677223735.png

3. Drag&drop a Value Behavior (which is a Value Processing Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677223783.png

4. Select the Value Behavior on the right of the Scene Tree View and set the Value Behavior's AcceptValueEvent Property to "true" by checking the checkbox.

drawing-7-1677223801.png

5. Drag&drop the Move Node Behavior (which is a Value Processing - Transformation Behavior) from the Behaviors Panel of the ToolBox onto the Value Behavior's Receivers.

drawing-7-1677223828.png

6. Drag&drop an OnClick Behavior (which is a Control Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control.

drawing-7-1677223850.png

7. Drag&drop a Send Value as Event Behavior (which is a Action - Property Behavior) from the Behaviors Panel of the ToolBox onto the OnClick Behavior's Actions Property.

drawing-7-1677223875.png

8. Select the Send Value as Event Behavior on the right side of the Scene Tree View and set the value to datatype "Float" value "100,00" in the Properties view.

drawing-7-1677223899.png

9. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677223911.png

10. When Clicking on the TextButton in the Player, the Button moves to position 50, 50.

drawing-7-1677223936.png

Back to the menu


OnClick Example

1. Drag&drop a SolidColorNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677228014.png

2. Drag&drop a OnClick Behavior (which is a Control Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the SolidColorNode in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677228098.png

3. Drag&drop a Set Color SetColor Behavior (which is a Action - Property Behavior) from the Toolbox view onto the Actions of the OnClick Behaviors in the SceneTree.

drawing-7-1677228070.png

4. Select the Set Color Behavior and change the Color to red.

drawing-7-1677228106.png

5. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677228115.png

6. When clicking on the SolidColorNode, the SolidColorNode's color changes to red.

drawing-7-1677228134.png

Back to the menu


OnPressed Example

1. Drag&drop a SolidColorNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677228338.png

2. Drag&drop a OnPressed Behavior (which is a Control Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the SolidColorNode in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677228366.png

3. Drag&drop a Set Color SetColor Behavior (which is a Action - Property Behavior) from the Toolbox view onto the Actions of the OnPressed Behaviors in the SceneTree.

drawing-7-1677228409.png

4. Select the Set Color Behavior and change the Color to red.

drawing-7-1677228439.png

5. Save your solution and start the CGIPlayer through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677228460.png

6. When pressing the mouse left button on the SolidColorNode, the SolidColorNode's color changes to red.

drawing-7-1677228477.png

Back to the menu


Perform Transition Requests Example

1. Drag&drop a SolidColorNode from the "Nodes 2D" Panel of the Toolbox to the 2D scene "Scene2D" in the SceneEditor or the Scene Tree view. Change the Scale X and Scale Y propertes to 3,0 each in the Properties view.

drawing-7-1677460607.png

2. Open the already existing 3D scene "Scene3D" by double-clicking it in the Solution Explorer on the left.

drawing-7-1677460624.png

3. Drag&drop a Cube Control from the Controls Panel of the Toolbox to the 3D Scene "Scene3D" in SceneEditor or the Scene Tree view.

drawing-7-1677460648.png

4. Select the Cube Control in the Scene Tree view and set the Position properties to (0, 0, 0).

drawing-7-1677460668.png

5. Switch back to the 2D scene "Scene2D" by double-clicking it in the Solution Explorer on the left.

drawing-7-1677460682.png

6. Drag&drop a OnClick Behavior (which is a Control Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the SolidColorNode in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677460707.png

7. Drag&drop a Perform Transition Requests Perform Transition Requests Behavior (which is a Action - Transition Behavior) from the Toolbox view onto the Actions of the OnClick Behaviors in right side of the SceneTree view.

drawing-7-1677460734.png

8. Drag&drop two Transition Request Transition Request Behaviors (which are Action - Transition Behaviors) from the Toolbox view onto the Requests of the Perform Transition Requests Perform Transition Requests Behavior in the right side of the SceneTree view.

drawing-7-1677460756.png

9. Select the first one of the two Transition Request Transition Request Behaviors. Set the Transition Request Transition Request Behavior's Identifier to the current scene (Scene2D) by clicking on the magnifying glass on the right of the input field and selecting the current 2D Scene (Scene2D) in the "Choose Item" dialog.

drawing-7-1677460782.png

After that, the Transition Request Transition Request Behavior's Properties will look as follows.

drawing-7-1677460805.png

10. Now, select the second Transition Request Transition Request Behaviors. Set the Transition Request Transition Request Behavior's Identifier to the 3D scene (Scene3D) by clicking on the magnifying glass on the right of the input field and selecting the 3D Scene (Scene3D) in the "Choose Item" dialog.

drawing-7-1677460836.png

After that, the Transition Request Transition Request Behavior's Properties will look as follows.

drawing-7-1677460854.png

11. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677460867.png

12. You can see your 2D scene with the white SolidColorNode. When clicking on the SolidColorNode, a transition to the 3D scene is performed.

drawing-7-1677460901.png
drawing-7-1677460916.png
Initially displaying Scene2D After Clicking, displaying Scene3D

Back to the menu


Render Child Nodes Example

1. Drag&drop two TextButton Controls from the Controls Panel of the Toolbox to the already existing Group Node of the Scene Tree and change their texts to "Button 1" and "Button 2".

drawing-7-1677461065.png

2. Drag&drop an Event Handler Behavior (which is a Control Behavior) from the Toolbox view onto the Group Node in the Scene Tree view.

drawing-7-1677461099.png

3. Select the Group Node in the Scene Tree view and drag&drop a Check Click Behavior (which is a Condition - Input Behavior) from the Toolbox view onto the Condition of the Group Node's EventHandler in the right side of the Scene Tree view.

drawing-7-1677461124.png

4. Keep the Group Node selected in the Scene Tree view and drag&drop a Render Child Nodes Behavior (which is a Action - Property Behavior) from the Toolbox view onto the "Actions" of the Group Node's EventHandler on the right side of the Scene Tree view.

drawing-7-1677461147.png

5. Select the "Render Child Nodes" Behavior in the right side of the Scene Tree view. In the Properties view set Index to "1,0" and OperationMode to to "SingleNode".

drawing-7-1677461167.png

6. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677461178.png

7. After clicking on one of the two buttons (no matter which one), "Button 2" will disappear and "Button 1" will get rendered.

drawing-7-1677461200.png

8. Stop the Player by pressing on the Stop Button (next to the option "Generate and Play") and change the "Render Child Nodes" Behavior's Property: Set Index to "2,0".

drawing-7-1677461219.png

9. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677461245.png

10. After clicking on one of the two buttons (no matter which one), "Button 1" will disappear and "Button 2" will get rendered.

drawing-7-1677461271.png

Back to the menu


Send Value As Event Example

1. Drag&drop two TextButton Controls and a TextValue Control from the Controls Panel of the Toolbox to the Scene Editor or Scene Tree.
drawing-7-1677461437.png

2. Rename the TextButton Controls to "DecreaseButton" and "IncreaseButton". Change the text of the DecreaseButton to "-" and the text of the IncreaseButton to "+".

drawing-7-1677461590.png

3. Change the Text of the TextValue Control to "Count: %d" and arrange the three Controls as in the right picture below.

drawing-7-1677461636.png

4. The value of the TextValue Control should be increased or decreased according to the pressed Button. To connect the TextButton Controls with the TextValue Control select one of the TextButtons. Drag&drop a Send Value as Event Behavior (which is a Action - Property Behavior) onto the Actions sections of both of the TextButton Controls' EventHandler.

drawing-7-1677461678.png

5. Select the "SendValueAsEvent" Behavior of the "DecreaseButton" and change the Value to "-1,00" in the Properties view. As the value should change relative to the current value, the "ChangeValue" property has to be set to "Relative". Select the "SendValueAsEvent" Behavior of the "IncreaseButton" and change the Value to "1,00" in the Properties view. Again, the "ChangeValue" property has to be set to "Relative"

drawing-7-1677461711.png

6. Both "SendValueAsEvent" Behaviors need to be configured with the "Text Value" Control as TargetNode by clicking on the magnifying glass on the right of the property.

drawing-7-1677461727.png

7. Set the scene's TextValue Node as TargetNode for the Send Value as Event Behavior: After clicking the magnifying glass in the properties panel, the "Select Item" Dialog is opened. Select the scene's TextValue Node and press OK. Repeat this for the second "SendValueAsEvent" Behavior.

drawing-7-1677461761.png

8. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677461780.png

9. When pressing the "-" Button, the Count value is decreased by one. When pressing the "+" Button, the Count value is increased by one.

drawing-7-1677461844.png

Back to the menu


Set Alpha Value Example

1. Drag&drop a TextButton Control from the Controls Panel of the Toolbox to the SceneEditor or the Scene Tree and change the Text to "Set Alpha Value"

drawing-7-1677462561.png

2. Select the TextButton in the Scene Tree View and delete all Behaviors that are automatically attached to the TextButton from the right side of the Scene Tree View.

drawing-7-1677462609.png
drawing-7-1677462633.png
before deleting all behaviors after deleting behaviors

3. Select the TextButton Control in the SceneTree View and decrease its Alpha Value e.g. to 0,5 in the Item Tab of the Properties Panel.

drawing-7-1677462646.png

4. Drag&drop a Value Behavior (which is a Value Processing Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677462713.png

5. Select the Value Behavior on the right of the Scene Tree View and set the Value Behavior's AcceptValueEvent Property to "true" by checking the checkbox.

drawing-7-1677462728.png

6. Drag&drop the Set Alpha Value Behavior (which is a Value Processing - Effects Behavior) from the Behaviors Panel of the ToolBox onto the Value Behavior's Receivers.

drawing-7-1677462757.png

7. Drag&drop an OnClick Behavior (which is a Control Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control.

drawing-7-1677462788.png

8. Drag&drop a Send Value as Event Behavior (which is a Action - Property Behavior) from the Behaviors Panel of the ToolBox onto the OnClick Behavior's Actions Property.

drawing-7-1677462835.png

9. Select the Send Value as Event Behavior on the right side of the Scene Tree View and set the value to datatype "Float" value "1,00" in the Properties view.

drawing-7-1677462851.png

10. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677462862.png

11. When Clicking on the TextButton in the Player, the Button moves to position 50, 50.

drawing-7-1677462890.png

Back to the menu


Set Image Example

1. Drag&drop a TextButton Control from the Controls Panel and a BitmapNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677463007.png

2. Position the TextButton Control and the BitmapNode next to each other in the Scene Editor.

drawing-7-1677463025.png

3. Drag&Drop a Provide Image Behavior (which is a Control - Public Property Behavior) from the Behaviors Panel of the ToolBox onto the BitmapNode in the Scene Tree view.

drawing-7-1677463058.png

4. Select the TextButton Control in the Scene Tree view and change its Text to "Set Image" in the Properties view.

drawing-7-1677463073.png

5. Drag&Drop a Set Image Behavior (which is a Action - Property Behavior) from the Behaviors Panel of the ToolBox onto the "Actions" field of the TextButton Control's EventHandler on the right side of the Scene Tree.

drawing-7-1677463107.png

6. Select the newly added Set Image Behavior in right side of the Scene Tree view. Adjust the "Set Image" Behavior's Image Property by clicking the magnifying glass on the right of the input field.

drawing-7-1677463121.png

7. Set the "Set Image" Behavior's image property: After clicking the magnifying glass in the properties panel, the "Select Item" Dialog is opened. Select an image from the construction kit (a preview of the image is shown when moving the mouse over the image) and press OK.

drawing-7-1677463153.png

8. Select the Set Image Behavior on the right side of the Scene Tree view and drag&drop it onto the BitmapNode on the left side of the Scene Tree view (you can see a little arrow and "Set Image").

drawing-7-1677463173.png

9. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677463182.png

10. When the TextButton is pressed, the configured image will be set to the BitmapNode and the image will appear.

drawing-7-1677463219.png

Back to the menu


Set Position Example

1. Drag&drop a TextButton Control from the Controls Panel of the Toolbox to the SceneEditor or the Scene Tree and change the Text to "Change Position".

drawing-7-1677463851.png

2. Select the TextButton in the Scene Tree View and delete all Behaviors that are automatically attached to the TextButton from the right side of the Scene Tree View.

drawing-7-1677463866.png
drawing-7-1677463877.png
before deleting all behaviors after deleting behaviors

3. Drag&drop a Value Behavior (which is a Value Processing Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677463921.png

4. Select the Value Behavior on the right side of the Scene Tree View and set the Value Behavior's AcceptValueEvent Property to "true" by checking the checkbox.

drawing-7-1677463936.png

5. Drag&drop a Set Position Behavior (which is a Value Processing - Transformation Behavior) from the Behaviors Panel of the ToolBox onto the Value Behavior's Receivers.

drawing-7-1677463971.png

6. Select the Set Position Behavior on the right side of the Scene Tree view and set its TranslationAxis Property to "AxisX"

drawing-7-1677463982.png

7. Drag&drop an OnClick Behavior (which is a Control Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control.

drawing-7-1677464010.png

8. Drag&drop a Send Value as Event Behavior (which is a Action - Property Behavior) from the Behaviors Panel of the ToolBox onto the OnClick Behavior's Actions Property.

drawing-7-1677464048.png

9. Select the Send Value as Event Behavior on the right side of the Scene Tree View and set the value to datatype "Float" value "100,00" in the Properties view.

drawing-7-1677464062.png

10. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677464071.png

11. When Clicking on the TextButton in the Player, the Button's horizontal position (x coordinate) is set to 100, so it moves to the right.

drawing-7-1677464100.png

Back to the menu


Set Rotation Example

1. Drag&drop a TextButton Control from the Controls Panel of the Toolbox to the SceneEditor or the Scene Tree and change the Text to "Set Rotation".

drawing-7-1677464616.png

2. Select the TextButton in the Scene Tree View and delete all Behaviors that are automatically attached to the TextButton from the right side of the Scene Tree View.

drawing-7-1677464644.png
drawing-7-1677464661.png
before deleting all behaviors after deleting behaviors

3. Drag&drop a Value Behavior (which is a Value Processing Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677464698.png

4. Select the Value Behavior on the right side of the Scene Tree View and set the Value Behavior's AcceptValueEvent Property to "true" by checking the checkbox.

drawing-7-1677464712.png

5. Drag&drop a Set Rotation Behavior (which is a Value Processing - Transformation Behavior) from the Behaviors Panel of the ToolBox onto the Value Behavior's Receivers.

drawing-7-1677464744.png

6. Drag&drop an OnClick Behavior (which is a Control Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control.

drawing-7-1677464772.png

7. Drag&drop a Send Value as Event Behavior (which is a Action - Property Behavior) from the Behaviors Panel of the ToolBox onto the OnClick Behavior's Actions Property.

drawing-7-1677464807.png

8. Select the Send Value as Event Behavior on the right side of the Scene Tree View and set the value to datatype "Float" value "40,00" in the Properties view.

drawing-7-1677464829.png

9. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677464839.png

10. When Clicking on the TextButton in the Player, the Button is rotated 40° clockwise.

drawing-7-1677464862.png

Back to the menu


Set Scale Example

1. Drag&drop a SolidColorNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677464965.png

2. Drag&drop a Value Behavior (which is a Value Processing Behavior) from the Behaviors Panel of the Toolbox onto the Text Value Control in the Scene Tree.

drawing-7-1677464995.png

3. Select the Value Behavior on the right side of the Scene Tree View. Set the Value Behavior's AcceptValueEvent Property to "true" by checking the checkbox in the Properties view. Check the Minimum Checkbox and set the Minimum Value to 0,50. Check the Maximum Checkbox and set the Maximum Value to 3,00. Also, set the Variant Value to 1,00.

drawing-7-1677465013.png

4. Select the SolidColorNode in the Scene Tree view and drag&drop an Interpolate Value Behavior (which is a Value Processing Behavior) onto the Value Behavior's Receivers in the right side of the Scene Tree Panel.

drawing-7-1677465082.png

5. Select the Interpolate Value Behavior on the right side of the Scene Tree view and set the property "Units Per Second" to 1,00 in the Properties view.

drawing-7-1677465101.png

6. Drag&Drop a Set Scale Behavior (which is a Value Processing - Transformation Behavior) onto the Interpolate Value Behavior's Receivers in the right side of the Scene Tree Panel.

drawing-7-1677465130.png

7. Select the Set Scale Behavior and check the ScaleAlongY checkbox in the Properties view. Set the ScaleVextor2D Property to (1, 1).

drawing-7-1677465144.png

8. Drag&drop two TextButton Controls from the Controls Panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677465180.png

9. Configure the first TextButton Control to have the Text "Decrease". Configure the second TextButton Control to have the Text "Increase" and set it's Enabled Property to "false" by unchecking the Checkbox.

drawing-7-1677465215.png

10. Drag&drop a Send Value as Event Behavior (which is a Action - Property Behavior) from the Toolbox view onto the TextButton's Actions on the right side of the SceneTree view. Do this for both of the TextButton Controls.

drawing-7-1677465306.png

11. Select the first TextButton Control (the one with text "Decrease") and then select its Send Value as Event Behavior on the right side of the Scene Tree view. Set the Value Property to 0,50. Adjust the behavior's TargetNode by clicking on the magnifying glass on the right of the property.

drawing-7-1677465327.png

12. Set the scene's TextNode as SolidColorNode for the Send Value as Event Behavior: After clicking the magnifying glass in the properties panel, the "Select Item" Dialog is opened. Select the scene's SolidColorNode and press OK.

drawing-7-1677465358.png

13. Select the second TextButton Control (the one with text "Increase") and then select its Send Value as Event Behavior on the right side of the Scene Tree view. Set the Value Property to 3,00. Set the behavior's TargetNode to the scene's SolidColorNode as you just did for the first TextButton Control.

drawing-7-1677465376.png

14. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677465391.png

15. When clicking on the TextButton "Increase" in the Player, the size of the SolidColorNode is slowly increased. When clicking on the TextButton "Decrease", the size of the SolidColorNode is slowly decreased.

drawing-7-1677465415.png

Back to the menu


Set Text Example

1. Drag&drop a TextButton Control from the Controls panel and a TextNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree. Set the TextButton's Text to "Change Text".

drawing-7-1677465523.png

2. Position the TextButton Control and the TextNode nicely in the Scene Editor.

drawing-7-1677465539.png

3. Drag&Drop a Provide Text Behavior (which is a Control - Public Property Behavior) from the Behaviors Panel of the ToolBox onto the TextNode in the Scene Tree view.

drawing-7-1677465570.png

4. Select the TextButton Control and drag&drop a Set Text Behavior (which is a Action - Property Behavior) from the Behaviors Panel of the ToolBox onto the "Actions" field of the TextButton Control's EventHandler on the right side of the Scene Tree.

drawing-7-1677465604.png

5. Select the newly added Set Text Behavior in right side of the Scene Tree view and change the Text property to "Hallo" in the Properties view.

drawing-7-1677465618.png

6. Select the Set Text Behavior on the right side of the Scene Tree view and drag&drop it onto the TextNode on the left side of the Scene Tree view (you can see a little arrow and "Set Text").

drawing-7-1677465630.png

7. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677465645.png

8. When the TextButton is pressed, the text of the TextNode will be changed to "Hallo".

drawing-7-1677465664.png

Back to the menu


Start Timer Example

1. Drag&drop a TextButton Control and a Text Control from the Controls panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677466176.png

2. Select the TextButton in the Scene Tree View and delete all Behaviors that are automatically attached to the TextButton from the right side of the Scene Tree View.

drawing-7-1677466205.png
drawing-7-1677466222.png
before deleting all behaviors after deleting behaviors

3. Set the TextButton Control's text to "Start Timer" and the Text Control's text to "Wait for Timer".

drawing-7-1677466255.png

4. Drag&drop an OnClick Behavior (which is a Control Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control in the SceneTree. The Handle Control State Behavior is needed in order for the Text Control to receive Input Events.

drawing-7-1677466286.png

5. Select the TextButton Control in the Scene Tree view and drag&drop a Start Timer Behavior (which is a Action - Control Behavior) from the Toolbox view onto the Actions of the TextButton Control's OnClick Behavior in the right side of the Scene Tree view.

drawing-7-1677466318.png

6. Select the Start Timer Behavior in the right side of the Scene Tree view and set the Delay property to "1000" in the properties view. Set the Start Timer Behavior's Target Node to the Text Control you have added to the scene in step 1 by clicking the magnifying glass on the right side of the input filed and selecting the Text Value Control in "Choose Item" dialog.

drawing-7-1677466347.png

After that, the Start Timer Behavior's Properties will look as follows.

drawing-7-1677466362.png

7. Drag&drop an On Timer Behavior (which is a Control Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control in the SceneTree. The Handle Control State Behavior is needed in order for the Text Control to receive Input Events.

drawing-7-1677466421.png

8. Select the Text Control in the Scene Tree view and drag&drop a Set Color Behavior (which is a Action - Property Behavior) from the Toolbox view onto the Actions of the Text Control's On Timer Behavior in the right side of the Scene Tree view.

drawing-7-1677466472.png

9. Select the Set Color Behavior and change the Color to red.

drawing-7-1677466483.png

10. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677466498.png

11. When the TextButton "Start Timer" is pressed, a timer is started and after some time the Text Control's text changes its color.

drawing-7-1677466517.png

Back to the menu


Switch Image Example

1. Drag&drop a FlipBook Control from the Controls panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677466622.png

2. Drag&drop a Value Behavior (which is a Value Processing Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the TextButton Control in the SceneTree. The Handle Control State Behavior is needed in order for the Text Control to receive Input Events.

drawing-7-1677466649.png

3. Select the Value Behavior in the right side of the Scene Tree view and set the "AcceptValueEvent" property to "True" in the Properties view.

drawing-7-1677466660.png

4. Select the FlipBook Control in the Scene Tree view and drag&drop a Switch Image Behavior (which is a Value Processing - Effects Behavior) from the Toolbox view onto the Receivers of the FlipBook Control's Value Behavior in the right side of the Scene Tree view.

drawing-7-1677466696.png

5. Drag&drop an OnClick Behavior (which is a Control Behavior) from the Behaviors Panel of the ToolBox onto the FlipBook Control in the SceneTree.

drawing-7-1677466717.png

6. Select the FlipBook Control in the Scene Tree view and drag&drop a Send Value as Event Behavior (which is a Value ProcessingAction - EffectsProperty Behavior) from the Toolbox view onto the Actions of the FlipBook Control's OnClick Behavior in the right side of the Scene Tree view.

drawing-7-1677466750.png

7. Select the Send Value as Event Behavior in the right side of the Scene Tree view and set the "Value" propert to "5,00".

drawing-7-1677466761.png

8. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677466774.png

9. When the FlipBook Control is clicked in the Player, the image of the FlipBook is switched.

drawing-7-1677466812.png

Back to the menu


Transform Gesture Action Example

1. Drag&drop a SolidColorNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677471881.png

2. Select the SolidColorNode's SolodColorBushBlend effect and change the Size properties to 100,00 and 100,0 in the Properties view.
The SolidColorNode is going to be our touchable content, which should be large enough to touch it with two fingers. This could also be achieved by extending the touchable area of the RenderNode (defining the Bounding Rectangle). But please beware that this will have consequences on the laid out size.

drawing-7-1677471909.png

3. Drag&drop a Transform Gesture Action Behavior (which is a Action - Gesture Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the SolidColorNode in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677471949.png

4. Select the Transform Gesture Action Behavior and configure Panning Minimum and Maximum values for x and y coordinate.

drawing-7-1677471964.png

5. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677471979.png

6. When panning the SolidColorNode you can drag it around in the area that has been defined in the Transform Gesture Action Behavior's Panning Properties. If you do have a touch screen available, you can also try pinching and rotating the SolidColorNode.

drawing-7-1677471997.png

Back to the menu


Transform Gesture Condition Example

1. Drag&drop a SolidColorNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677472095.png

2. Select the SolidColorNode's SolidColorBushBlend effect and change the Size properties to 100,00 and 100,0 in the Properties view.
The SolidColorNode is going to be our touchable content, which should be large enough to touch it with two fingers. This could also be achieved by extending the touchable area of the RenderNode (defining the Bounding Rectangle). But please beware that this will have consequences on the laid out size.

drawing-7-1677472127.png

3. Drag&drop a Event Handler Behavior (which is a Control Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the SolidColorNode in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677472255.png

4. Drag&drop an Event Handler Behavior (which is a Control Behavior) from the Toolbox view onto the SolidColorNode or its parent node in the Scene Tree view.

drawing-7-1677472287.png

5. Select the SolidColorNode and drag&drop a Transform Gesture Condition Behavior (which is a Condition - Input Behavior) onto the Event Handler EventHandler's Condition on the right side of the Scene Tree View.

drawing-7-1677472332.png

6. Select the SolidColorNode and drag&drop a Set Color Behavior (which is a Action - Property Behavior) onto the Event Handler EventHandler's Actions on the right side of the Scene Tree View.

drawing-7-1677472363.png

7. Select the Set Color Behavior and change the Color to red.

drawing-7-1677472383.png

8. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677472394.png

9. When a transform gesture is detected, a TransformEvent is sent to the touched node. If the event matches the condition, the configured action will be performed. In our case, when a transform gesture is detected, the SetColor Action will be performed and the SolidColorNode changes its color.

drawing-7-1677472413.png

Back to the menu


Swipe Gesture Example

1. Drag&drop a SolidColorNode from the "Nodes 2D" Panel of the Toolbox to the SceneEditor or the Scene Tree.

drawing-7-1677472523.png

2. Select the SolidColorNode's SolidColorBushBlend effect and change the Size properties to 100,00 and 100,0 in the Properties view.
The SolidColorNode is going to be our touchable content, which should be large enough to touch it with two fingers. This could also be achieved by extending the touchable area of the RenderNode (defining the Bounding Rectangle). But please beware that this will have consequences on the laid out size.

drawing-7-1677472556.png

3. Drag&drop a Event Handler Behavior (which is a Control Behavior) and a Handle Control State Behavior (which is a Control - Internal Behavior) from the Behaviors Panel of the ToolBox onto the SolidColorNode in the SceneTree. The Handle Control State Behavior is needed in order for the TextButton Control to receive Input Events.

drawing-7-1677472578.png

4. Select the SolidColorNode and drag&drop a Swipe Gesture Condition Behavior (which is a Condition - Input Behavior) onto the Event Handler EventHandler's Condition on the right side of the Scene Tree View.

drawing-7-1677472613.png

5. Select the Swipe Gesture Condition Behavior and configure its direction to "Right".

drawing-7-1677472642.png

6. Select the SolidColorNode and drag&drop a Set Color Behavior (which is a Action - Property Behavior) onto the Event Handler EventHandler's Actions on the right side of the Scene Tree View.

drawing-7-1677472735.png

7. Select the Set Color Behavior and change the Color to red.

drawing-7-1677472750.png

8. Copy the EventHandler (with both its Condition and its Action you configured in steps 3 - 6 of this example) by right-clicking on the EventHandler in the right side of the Scene Tree View and choosing "Copy" (or via keyboard shortcut use Ctrl+C). Paste the EventHandler by right-clicking on the Behaviors (the topmost entry, where it says "Behaviors") in the right side of the Scene Scene Tree view and choosing "Paste" (or via keyboard shortcut select the topmost entry where it says "Behaviors" and press Ctrl+V).

drawing-7-1677472811.png

9. By duplicating the EventHandler you have created "Event Handler_1" with Condition "Swipe Gesture_1" and Action "Set Color_1".

drawing-7-1677472824.png

10. Select the "Swipe Gesture_1" Condition and set its Direction to "Left". Select the "Set Color_1" Action and configure its color to Green.

drawing-7-1677472857.png

11. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677472871.png

12. In the beginning the SolidColorNode is white. But after a swipe to the right, the SolidColorNode is gets red. If you swipe to the left, the SolidColorNode gets green.

drawing-7-1677472911.png
drawing-7-1677472931.png
drawing-7-1677472948.png
Initial color After swipe right After swipe left

Back to the menu


Scroll View Example

1. Drag&drop a ScrollView Control from the Controls Panel of the Toolbox to the Scene Editor or the Scene Tree.

drawing-7-1677473077.png

2. Drag&drop a StackLayout from the "Nodes2D" Panel of the ToolBox onto the ContentAnchor of the ScrollView Control in the Scene Tree.

drawing-7-1677473134.png

3. Change the Layouter Arrangement of the StackLayout to "vertical".

drawing-7-1677473146.png

4. Drag&drop a Text Control from the Controls Panel, a BitmapNode from the "Nodes2D" Panel of the ToolBox and another Text Control from the Control Panel onto the StackLayout in the Scene Tree.

drawing-7-1677473184.png

5. Select a Text Control in the Scene Tree View and set its width to "500" in the Layout Size Properties.

drawing-7-1677473201.png

6. In the Control Properties change the Text Property to a longer, several lines long text (newlines can be achieved via Ctrl+Enter). Also set the Text Control to be Multiline and enable Word Wrap.

drawing-7-1677473212.png

7. Repeat the previous two steps for the second Text Control.

drawing-7-1677473240.png

8. Select the BitmapNode in the Scene Tree View before selecting the BitmapBrushBlend Effect on the right side of the Scene Tree View. Adjust the BitmapBrushBlend Effect's image by clicking on the magnifying glass on the right of the input field.

drawing-7-1677473273.png

9. Set the BitmapBrushBlend Effect's image property: After clicking the magnifying glass in the properties panel, the "Select Item" Dialog is opened. Select an image from the construction kit (a preview of the image is shown when moving the mouse over the image) and press OK.

drawing-7-1677473307.png

10. The SceneEditor now displays the ScrollView and its contents without the possibility to scroll.

drawing-7-1677473323.png

11. Select the ScrollView Control in the Scene Tree View and set its Layout Size to a height of "400". After that, a vertical scrollbar is displayed in the SceneEditor.

drawing-7-1677473358.png

12. Save your solution and start the Player through the Play button (with the option "Generate and Play") in the Toolbar on the top to see the result.

drawing-7-1677473378.png

13. The ScrollView is displayed with a full functional scrollbar. When scrolling, you can check that all configured content is available: both Text Controls and one BitmapNode.

drawing-7-1677473392.png

Back to the menu