Skip to main content

Part 5: Configure State Machine

State Machine feature is used for transitioning a screen to others. Here, the display is transitioned by pressing Music and Navigation buttons in the Menu section.

Click the triangular icon beside Solution > State Machines in Solution Explorer. Double-click GlobalStateMachine that is shown after expanding State Machines.

drawing-7-1676628402.png
  • The State Machine Editor is shown.
  • Make sure the checkbox of Is Global on Properties is marked.
drawing-7-1676628418.png
drawing-7-1676628429.png

Click State on State Machine Editor, and change Name on Properties to Music. Set the Identifier property to Music scene. (see the below)

drawing-7-1676628442.png
drawing-7-1676628460.png

Add Handle Control State to TextButton_Music and TextButton_Navigatio node in Menu_button group by drag-and-drop operation.

drawing-7-1676628477.png

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

drawing-7-1676628491.png

Click that State on State Machine Editor, and change Name on Properties to Navigation. Connect the two States in both directions with a Transition (see figure).

drawing-7-1676628510.png

Select each Transition and set the displayed Properties as shown in the table below.
Navigation to Music

drawing-7-1676628525.png
Transition
Sender Textbutton_Music
Event Clicked
Condition Check Click
Condition Parameters
Sender Textbutton_Music
Event AnyClick
Condition 0

Music to Navigation

drawing-7-1676628603.png
Transition
Sender Textbutton_Navigation
Event Clicked
Condition Check Click
Condition Parameters
Sender Textbutton_Navigation
Event AnyClick
Condition 0

Select Music State and add Transition Request behavior to On Entry Action/On Exit Action. After adding, set each behavior as shown in the table below.

drawing-7-1676628670.png
On Entry Action
Action Transition Request
RequestType Activate
Identifiler /Scenes/IVI_Sample/Group2D:IVI_Sample/Group2D:Music
On Exit Action
Action Transition Request
RequestType Deactivate
Identifiler /Scenes/IVI_Sample/Group2D:IVI_Sample/Group2D:Music

Select Navigation State and take same operation.

drawing-7-1676628686.png
On Entry Action
Action Transition Request
RequestType Activate
Identifiler /Scenes/IVI_Sample/Group2D:IVI_Sample/Group2D:Navigation
On Exit Action
Action Transition Request
RequestType Deactivate
Identifiler /Scenes/IVI_Sample/Group2D:IVI_Sample/Group2D:Navigation


Click the Play button in the menu bar to run CGI Player. Click the either button of Music/Navigation on the upper part to transition to other image.

drawing-7-1676628707.png