GettingStartedControls Part 1
This
The scene is built up using imported images and configuring various controls (such as TellTale, Gauge, DigitalClock, TextValue, Text, FlipBook). The use of a ForwardValue behavior will ensure that the Speed Gauge and an additional textual display will show the same value at any time.
Finally, the Panel is started to verify the coherency of the Speed Gauge and the speed's textual display.

Setting up the SceneComposer Solutionsolution
Choose the Empty Solution template and save it as shownstarting inpoint.

Save the new solution using Save Solution As... from File menu.

Inside the file selector box create a new Solution

You should have now the following file structure on disk:

The file GettingStartedControls.scs is createdthe main solution file and saved.
Our GettingStartedControls solution will use a screen resolution of 1024x768 pixels. Since the Renderdefault Targetsresolution panelsettings are different we have to adapt them within the RenderTargets tab on the top right andof the SceneComposer.

Please select ["Display(0)" Displayas (0)can ].be Inseen above. This selection will show the Properties panel below change the display's X and Y Resolution.

The "X Resolution" and "Y Resolution" properties have to be defined.

Preparing the Scene

Tip: It might be a good idea to make a backup of your solution now! If you destroy something during execution of the following steps you always have the possibility to restart with a clean solution. To make a copy just make a copy of the GettingStartedControls folder or create a copy by archiving into a zip file.
ImportDeletion Imagesof unused Scenes
All content that we want to display is organized into scenes. There are available scenes for 2D and 3D content. In the beginning we will only use 2D scenes to keep things a little easier. In our current solution we already have scenes of both types available. And because we don't need a 3D scene, we will delete it now.
The content of a solution is always displayed in the Solution Explorer on the top left side of SceneComposer.

In the Solution Explorer a tree view is used to visualize all the content similar to Windows File Explorer. Please click the small triangle to the left of the Scenes folder at the bottom of the Solution Explorer.

There are two scenes available. Please select the Scene3D using your right mouse button and select "Delete" in the context menu. As an alternative you can select the scene with a left click and press the delete key from your keyboard to delete it.

There are some dependencies to other objects, therefore SceneComposer asks us how to handle it. Please select the following settings within the dropdown menus on the right side and press OK to discard the dialog.

You can save the solution again.
Creation of the first screen
The imagesfirst neededscreen forof our GettingStartedControls application will look like this:

In order to start easy, the screen will consist mainly of static images. Only the gauge (speedometer) and the text displaying the current speed will have real functionality behind them. At the bottom border a few tabs are shown wherein the user can later switch between different screens of the application. These tabs therefore are not static image elements but controls which are able to react on user (touch) input. The orange tab marks our current screen which is our home (cluster) screen.
As already mentioned, SceneComposer is using scenes to organize content which can be shown to the app user. These scenes typically contain only parts of application screens. As a cinema film is using scenes to put in order segments of a story, scenes in our context is playing a similar role. During this solutiontutorial we will create a scene per tab content and an additional scene which contains the tab bar itself.This will help us to not repeat ourselves. If we had organized the scene exactly like the screen content we would have to use a tab bar in every screen.
We are now renaming the left over Scene2D into "SceneHome" to have it easier later to find our home content. Please select the Scene2D and press F2 (or use the context menu) to enter "SceneHome" as the new name.

Please double click on the "SceneHome" to show this scene within the Scene Tree panel below the Solution Explorer.

The scene editor will show the whole content of an opened scene. If a scene is opened its visual content is also displayed in the Scene Editor window in the center of SceneComposer. If the scene is empty you can only see a yellow border which is representing the size of the application's screen resolution. You can zoom in and out using the mouse wheel. By holding the mouse wheel and dragging you can move around the content of your view while retaining the Zoom factor. To get back to the original 100% size, please use the icon in the toolbar (Set selected camera to predefined location and orientation).

To be able to show some "fancy" graphics we have to import the images into our solution. We use the import images function of SceneComposer which you can find in the import menu.

You will now be asked to save your solution. Please confirm!
A Windows File Explorer titled "Import Resources" will be imported.opened. SomePlease of them will be used as plain static images, but most will be used to configure controls.
<cgi-studio-root>/cgi_studio_content/Resources/GettingStartedControls/Cluster
Select
The images are now processed and the "Import Images ]Images" dialog will be opened

The
After pressthe [import OKthe ].Solution

The images haveare been imported into the solution and arenow ready to be used infor SceneHome.
our

Position Images

Repeat your actions with the speed"NewWarning80Bmp".
Your willscene could now look like this:

It is now time to improve the placement of the images to make room for the speedometer. To be placedable to move the images using the mouse, change the Editor panel mode. You can find icons in the Scenetoolbar Editor.

The current mode is for selecting elements in the Scene TreeEditor panel.
To be able to place an element to a predefined position, select the element (in this case the Navi60Bmp) either using a click on the element in the editor panel or in the Scene TreeTree. panelWhen selectan theelement imagesis individuallyselected and(such modifyas theirbelow)

Its properties are shown in the Properties panel on the bottomlower right.right
Y=121.
Render Node


Configure
ControlsPlease areposition specialimage NewWarning80Bmp to X=38 and Y=612.
In a real application, elements will be placed using layout controls to be able to adapt to different screen sizes or culture settings. Nevertheless direct placement is often needed within layout controls or where an application designer specifies absolute placement.
With dragging the images directly from the Solution Explorer we used a direct method to create RenderNodes containing the dragged image. Normally we choose directly the node type within the Toolbox (top right of SceneComposer) and configure the properties in the next step.
Special types of nodes that already contain logic for handling of user actions (touch, click) and state changes.changes Theyare called Controls. You can befind foundthese controls in the Controls section on top of the Toolbox,Toolbox.

The most common control is a Button. In our home scene we used a "TellTellTale" Tale" ControlsControl to indicate weather alerts, charging statusor information andan incoming calls.


This will open the "Choose Item" dialog. In the left panel you can navigate to Solution > Resources > Cluster and Yselect the correct image.

The TellTale's state can be changedconfigured choosing between On, Off and Blinking. For the blinking option the On Time and Off Time in ms can also be set. In the Propertiesimage panel'sbelow [you Transformationscan ]see section.the Theconfiguration for Tell Tale_Call.

You can now configure the TellTale controls' images and positions as follows:
Position
Off
Off


Configure
Another control which is used in our home scene is the "Gauge". It is very often used for Speedometers or visualization of RPM.
Please use the Toolbox and drag a Gauge"Gauge" Controlcontrol
To displayinto the current speedcenter of the carEditor apanel.

As you might have figured out the Gauge Control

Use the Properties panel'spanel [of Transformationsour ]Gauge sectionto configurechange the Gaugeimages Control'sand positionedit accordingthe values:

Click magnifying glass to the table.
right
217

Press OK and repeat the same steps for the Needle Image byselecting clickingNewNeedleBmp.

As you can see the corresponding magnifying glass icon.


Do the table below.

The needle willimage should now be displayedpositioned into the center of the gauge.

-
You may need to trigger a refresh by hitting the
<F5>button on your keyboard if the images' positions are not updated automatically.
Configure Digital Speed Display
ANow, "Textplace the control at the center of the scene (X=319, Y=217).
In the Gauge's Properties the Value property represents the current speed. Input Min and Input Max is the allowed range of speed (0-300 km/h). The Rotation Min and Rotation Max define the start and end point of the angles used (- 45° - 223°). The Internal Value" ControlChange Per Second property is used when a speed value is changed. That means in our case the needle moves up to 300 value units per second. Because the whole range is 0-300 within one second the speedometer will always be able to reach the targeted value. The Dampening Filter Constant is used to further smoothen the movement of the needle.
To display the currentdigital speed as digits

In the Properties panel's [ Control ] section configure properties from the table below.

km/h
Configuration:


Connect TextValue Control and Gauge Control
The Text Value control will now be connected to the Gauge control, so that both controls display the same value.

This behavior is responsible for copying the speed value from the Gaugegauge to the text value control. To do this, Text Value Node has to be configured as the behavior's TargetNode. In order to change the TargetNode, please click the corresponding magnifying glass icon and choose the Text Value Control, that can be found under Scenes > SceneHome > Text Value.

Next, we'll add a FlipBook control to the TextValueright control.
upper

configuration:


Add a FlipBook
The top center of our home screen is decorated with a "DigitalClock"Digital Clock control. We will also add a "FlipBook"This control tocan thebe upperfound right corner of the scene.
Check the First Scene
Y=116.
The first screen/scene is now finished.

To be able to simulate the final application it is necessary to export the asset of the application. An asset contains only used resources from your project (controls, scenes, images, …). This asset might be stored into flash on a real embedded target. For now we generate this asset to have it available as input for our Player application (simulation driver). To generate (export) the asset you can press CTRL+G or use the File Menu and select the "Generate Asset Library…" menu entry.

Use the Browse button to choose where the output file will be openedstored. inNow a floating way displayingpress the scenegenerate configuredbutton. The asset will be written.
If you want to run the Player from SceneComposer, you can do so by clicking the Play button in the stepsmenu above.
bar.


generated

before

In some cases you have to choose your target device. Set the checkmark in front of the SceneHome on the middle left. You now should see the newly created scene. You can now manipulate the Gauge value for example. Please use the controls on the left and click on the [ Controls ] tab.
km/h.

