Overview
This sampletutorial aims to help users master the state transition and behavior control mechanisms between multiple scenes using the state machine functionality in CGI Studio. Specifically, the tutorial covers a step-by-step approach to developing practical HMI (Human-Machine Interface) applications, including UI construction, scene management, switching behaviors based on user interactions, managing history, conditional branching, and displaying the number of aincoming simplecalls.
Through demonstratesthis tutorial, users will learn the configurationfollowing:
Main work content
Part 1 Basics of SceneUnderstanding how to create and manage multi-scene UIs in CGI Studio.
ThissampleBuilding
sets up simple9 scenesforincluding Main Menu, Navigation,MediaMedia, Phone, etc.
Manipulating text nodes, overlay layouts, and Phone.node positioning.
Adding Clear/Swap scenes are used to configuremanage abuffers and control sequences.
Learning how to control scene transitions using a waystate somachine.
Recreating a global state machine and linking it to scenes.
Controlling scene visibility using OnEntry/OnExit actions.
Configuring transitions using key inputs (left/right arrow keys).
Verifying transitions and behaviors in the userPlayer.
Using Subcharts and History State for advanced scene management.
Converting the Media State into a Subchart to switchmanage fromsub-scenes for Radio, Bluetooth, and USB.
Implementing History State to retain information about the previously active scene.
Configuring bidirectional transitions and state restoration between scenes.
Verifying scene toselection and behavior using the up/down arrow keys.
Implementing popup control and state transitions for incoming calls.
Creating an IncomingCall scene based on the existing Phone scene.
Controlling the display with the keyboard'sEnter arrowkey keys.for call display and the ESC key for hiding.
Constructing CallActive/CallInactive state machines.
Customizing the Statevisuals Machine'susing HistorySolidColorNode.
Understanding e.g. change the Media source from Radio (default)how to Bluetoothsend and switch to the Navigation or Phone scene. When he comes back to the Media scene, the correct media source will be selected.
Valuescan be sent from the State Machine to the scenes, triggering the content of the scene to change. Using this mechanism,Adding a
countertextcountingnodereceivedwithcalls“ReceivedcanCalls:be%d”configured that will be displayed into the Main MenuScene.scene.
Counting the number of incoming calls when entering the CallActive State.
Sending relative values as events using Send Value As Event.
Displaying call count information in real time using Format String.
The following chapters describe these scenarios. Please note that they are based on each other and it is recommended to work them through from Chapter 1 to Chapter 5.