hid - AppRecommendedFlow Demo

Description

This demo shows the recommended sequences for using the Circle Pad Pro when developing applications that use the HID library's ExtraPad.
For details, see the section titled Sequences for Using the Circle Pad Pro in the document titled CTR Programming Manual: System.

Required Environment

How to Use

Common to All Scenes
Input Operation
Close System The system will enter Sleep Mode. Opening the system resumes the previously displayed screen.

Save Data Selection Scene
Input Operation
Touch Panel Selects save data.

Save Data Operations Scene
Input Operation
Touch Panel ・ If the selected save data is new data, select whether to use the Circle Pad Pro (Yes/No).
・ Delete the save data.
・ Load the save data.

Circle Pad Pro Detection Confirmation Scene
Input Operation
Touch Panel Respond to messages displayed on the screen (Yes, No, OK, Cancel).

Circle Pad Pro Use Scene
Input Operation
START Button Opens the Options menu.
Circle Pad Moves a pattern.
+Control Pad Left/Right Rotates a line.
Circle Pad (R) Rotates a line.

Options Menu Scene
Input Operation
START Button Opens the Options menu.
Touch Panel The following operations are possible.
・ Turning the Circle Pad Pro on and off.
・ Checking the Circle Pad Pro connection.
・ Starting the Circle Pad Pro calibration applet.
・ Saving the settings.
・ Returning to the scene using the Circle Pad Pro.
・ Transitioning to the save data selection scene.
・ Responding to displayed messages (Yes, No, OK, Cancel).

Notes

Execution Procedure

Scene Composition

This demo is broadly composed of the following five scenes.

The figure below shows transitions between the composed scenes.

The state of the Circle Pad Pro detection thread and any sleep-related log messages are displayed in debugger output for all scenes.

----- Start AppRecommendedFlow -----
[Start] Extra pad detection......
[Detected] Extra Pad detected!
[Stop] Extra pad detection.
<< Sleep >>
<< Awake >>
[Start] Extra pad detection..
[Detected] Extra Pad detected!
[Stop] Extra pad detection.


Save Data Selection Scene

The following screens are displayed while the application is running.

This shows four save data slots, with each labeled slot showing the total play time for that save data. New data is displayed as "New data."
Selecting a save data slot on the touch panel transitions to the save data operations scene.


Save Data Operations Scene

The application displays the following screen if the selected data slot is for new data.

This message asks the user to confirm use of the Circle Pad Pro, so that the Circle Pad Pro on/off setting can be added to the save data.

The application displays the following screen for data slots that are not for new data.

This screen shows the save data name, total play time, and whether the Circle Pad Pro is enabled.
Select Delete on the upper right to delete this save data slot.
Select the Back button on the lower left to go back to the save data selection scene.
Touch the Load button on the lower right to go to the Circle Pad Pro detection scene.


Circle Pad Pro Detection Confirmation Scene

Processing differs depending on the conditions during the scene transition.
If the Circle Pad Pro is disabled but detected, the user is asked whether to enable it. Touching Yes then displays a message informing the user that the setting was changed.

  


If the Circle Pad Pro is enabled but not detected, the application attempts to detect it for 15 seconds and then displays its results.
Select Cancel to skip detection.

     


When the application detects the presence of the Circle Pad Pro, it checks for remaining battery power. The application shows the following if the battery is low.


The application displays the following message if you disconnect the Circle Pad Pro after it was detected but before the battery level is confirmed.


Circle Pad Pro Use Scene

The following shows a scene that supports use of the Circle Pad Pro.

The upper screen shows the following information.
・ Information about the selected save data.
・ State of the connection to the Circle Pad Pro and its battery level.
・ Information about flags used in application processing.

The lower screen shows an object that corresponds to input from the system and the Circle Pad Pro.
You can use the system's built-in Circle Pad to move the object.
Use Left and Right on the +Control Pad and the Circle Pad (R) of the Circle Pad Pro to rotate the line.

Any connection to or disconnection from the Circle Pad Pro, while moving the object, displays a message at the top of the lower screen.
The application displays a message about the battery level, if this is the first connection since application startup and the battery level is low.
You can still use the controls to move the object while this message is showing.

Press START to go to the Options menu.

     


Options Menu Scene

The application shows the following when transitioning to the Options menu scene. You can check the Circle Pad Pro connection, calibrate the Circle Pad (R), and save the current settings.
Touch the Return to play button to return to the Circle Pad Pro use scene. Select the Select save data button to go back to the save data selection scene.

With the Circle Pad Pro in the detected state, select the Off button to disable the Circle Pad Pro and display a message stating that it has been disconnected.

With the Circle Pad Pro in the disabled (off) state, select the On button to display a message confirming that you want to connect the Circle Pad Pro.
Select Yes to confirm the connection.

  

The following figures show the results of confirming the connection when enabling the Circle Pad Pro, and selecting Connect to confirm the connection.

  



Revision History

2012/04/19
Revised the reference to the programming manual.
2011/12/08
Added operation of closing the system.
Revised description of displaying the Options menu scene.
Changed terms for on / off setting and updated screenshots.
2011/11/28
Initial version.

CONFIDENTIAL