- Transitioning between different control schemes (e.g., driving a vehicle and first person shooter)
- Hiding the touch layout temporarily (to have a full touch experience, enable a cinematic experience, etc)
- Modifying the images/iconography of controls based on the player’s current game state. Some examples include:
- Change the image on the fire button based on what weapon the player has selected.
- Change the images of the abilities based on what items the player currently has in their inventory.
- Modifying the visual state (visiblity and enabled) of controls based on the player’s current game state. Some examples include:
- Disable the reload button when the player has no additional ammunition.
- Make the interact button visible when the player approach an item they can interact with (and invisible when they move away).
Changing Layouts at Runtime
Showing a specified layout The game should use theXGameStreamingShowTouchControlLayout API to show a new layout.
Hiding the current layout
The game should use the XGameStreamingHideTouchControls API to hide the currently being displayed layout.
Example of how a game can set the layout based on the current state of the game:
Changing State At Runtime
Initial state at the launch of the game is defined by the default state that was included in the Touch Adaptation Bundle. In the touch control layout, the control should reference the state for the property that may be changed at runtime. The game can utilize theXGameStreamingUpdateTouchControlsState API to update the state during runtime.
For example, the following would be used to have a “reload” control that starts disabled, but gets enabled when they should have that capability.
