This is how we handled the large process of managing all of the MotionInput teams and ensuring they were able to deliver.
As can be seen from our final templates, there is a standard quality maintained among every MFC, with the alignment and placement of names, sections and information buttons for simple readability. By separating the options into sections it is easier to focus on the sections that are relevant to you as a user.
The process of using the frontend GUIs to interact with MotionInput must be as streamlined as possible hence all these iterations however that was not our only area of focus. Ensuring that the teams of MotionInput v3.2 are able to adapt the backend of the MFCs to their needs is important so guiding them through the steps with one to one tutorials was a necessary step.
To further explain the backend functionality, the MFC is designed to allow each button and slider to manipulate information that can be stored and sent to a config file. By manipulating this JSON file you can change the settings and functionality of MotionInput. This means all the settings of MotionInput have to pass through and be stored in JSON files, this can be limiting in the sense that the values are only updated at launch time. Figuring out how to best work around these restrictions was a large part of our job.
The process runs as follows,
The code block writes JSON files for configuration data and current modes for the MFC application. It reads the existing JSON files and parses them into json objects using the json library (in our case nlohmann). Then, it updates the current mode and retrieves data from the current mode to generate a json array of facial switches (in this particular instance for the facial navigation application). The updated json object is written back to the file. The code then reads and parses another JSON file for general configuration data and makes changes to various settings. The updated json object is also written back to the file. Finally, the code restarts the MFC application to apply the changes made to the JSON files. Before restarting, it terminates the existing instance of the application, copies the amended configMFC.json file to config.json, and then launches the application again.
The method for opening the MFC and MotionInput was completely rewritten by us for a few reasons:
How does the new fix work:
As for the buttons themselves, explaining how they can be used and then creating uses from them for various teams was also part of our job. In terms of backend functionality, an MFC button works by triggering an event when it is clicked or pressed. When the button is clicked, it sends a message to its parent window, which is usually a dialog or a frame window. The parent window receives this message and then handles it by calling a function that performs the desired action.
The function called by the parent window when a button is clicked can be customised to perform any action desired. This can range from simple actions such as changing the text displayed on a label, to more complex actions such as executing a database query or performing a computation.
To create the custom function that is called when a button is clicked, you would typically define a member function in the parent window's class. This member function would be defined to take the appropriate arguments (such as the button ID), and would then perform the necessary action. The button's OnClick event would then be associated with this custom function.
In addition to responding to the user clicking the button, an MFC button can also respond to other events. For example, you could have the button change its appearance or behaviour when the user hovers over it with the mouse or when it receives focus. You could also associate the button with a keyboard shortcut, so that the user can trigger the button's action without having to click on it.
To better understand we can take a look at a button The UpdateMethodFacial() function is called when the user selects the facial method, the button the user sees has ID IDC_FACIAL_BUTTON but all the user will have to interact with is simply clicking the button that says Facial in the Method section. It then sets the check value for the facial method option to 1 and the check value for the speech method option to 0. It deletes all items from the six CComboBoxes (m_smile, m_fishFace, m_raisedEyebrows, m_openMouth, m_rotationLeft, m_rotationRight) except for the first item. Then, it adds five or six items from the facialValues array to each CComboBox based on the selected mode (eyes facial or nose facial). Next, it retrieves the current mode from the globalModesData array based on the selected mode (eyes facial or nose facial) and updates the selected value of each CComboBox based on the facial expression title and value from the retrieved mode.