Part 5: Configure State Machine
State Machine feature is used for transitioning afrom screenone state to others.another. Here,In theour displayexample, iswe transitionedwill have a Music state and a Navigation state. The transitions between these two are triggered by pressing the Music and Navigation buttons in the Menu section.
ClickTo configure the StateMachine click the triangular icon besideon the left of Solution > State Machines in Solution Explorer. Double-click GlobalStateMachine that is shown after expanding State Machines.


- The State Machine Editor is shown.
- Make sure the checkbox of Is Global on Properties is marked.



ClickSelect the already created State onin the State Machine Editor, and change its Name onto "Music" in the Properties topanel.

Whenever we enter the Identifier"Music" propertystate, the "Music" GroupNode shall get visible. When leaving the "Music" State, it shall get invisible. Therefore, an OnEntry action and an OnExit action has to Musicbe scene.configured.
Create a new "OnEntry" action by pressing the below)"+" sign next to OnEntry. Configure an "Enable Rendering" action, where the TargetNode is the IVI_Sample scene's "Music" GroupNode. Check the "Visible" checkbox to configure that the "Music" GroupNode shall be set to visible when executing the action.
To choose the TargetNode, press the magnifying glass icon. Then select the "Music" GroupNode in the Choose Item dialog and press "OK".



Create a new "OnExit" action by pressing the "+" sign next to OnExit similar to the OnEntry action you have just configured. This time, the "Visible" checkbox should be unchecked. This way the "Music" GroupNode will be set to invisible when executing the action.

Add a "Handle Control StateState" Behavior to TextButton_Music and TextButton_NavigatioTextButton_Navigation node (which are in the Menu_button groupgroup). This can be done by drag-draging-and-dropdropping operation.the behavior from the Toolbox Behaviors panel


Return to the State Machine Editor panel. Drag and drop a State (for the Navigation State) from the upper right toolbar.


ClickSelect that State onin the State Machine Editor, and change Nameits onname to "Navigation" in the Properties panel.
Whenever this state is entered, the Navigation GroupNode shall be visible and whenever this state is exited, the Navigation GroupNode shall get invisible.
Therefore, select the Navigation state and add an OnEnter and an OnExit action similar to Navigation.what we did for the Music state.

Connect the two States in both directions with Transitions. Just drag a Transition from the toolbar onto the outgoing state (seee.g. figure)Music) then click onto the second state (e.g. Navigation).


Next, we will configure how these transition are triggered. Select each Transition and set the displayed Properties as shown in the table below.Navigation to Music


Music to Navigation


Select Navigation State and take same operation.

Clickclick the Play button in the menu bar to run CGI Player.

The Player starts displaying the eitherMusic buttonscreen of(and Music/Navigationwe onare in Music state). Use the uppermenu partbuttons "Navigation" and "Music" to transitionswitch tobetween otherNavigation image.and Music.

