What’s this? #
It’s a widget that lets players modify the touch interface in real time. Depending on the settings imposed by the developer, they can modify the position and size of the virtual controls that make up the touch interface.
How to integrate in your project? #
- Create a widget, this could be your own widget for setting the parameters of your project or game.
- Add the Runtime Configurator widget. In the palette, it’s in the Touch Interface Designer category.
- Set it up as you wish.
How to configure? #
To work, the configurator needs to load a backup of your touch interface. I call this a configuration or layout.
- You must therefore first save your touch interface at any time using the “Save Configuration” function in the subsystem.
- You can then load a backup by calling the “Load Configuration” function from the Runtime Configurator widget.
- Your touch interface appears and you can start editing it. Either opt for touch or develop your own ways of modifying the touch interface, with sliders for example. The widget includes functions that let you do just that.
- Once you’ve completed your modifications, you can call up the “Save Configuration” function from the widget to save the changes.
- Lastly, if you want to display the changes on your touch interface, either create a new one, or call the “Load Configuration” function from the subsystem. This will rebuild the touch interface, taking the modifications into account.
Functions #
Settings #
- Is Preview Enabled : Returns true if a configuration is displayed by the configurator.
- Set Preview Enabled : Manually enable or disable preview. Preview is automatically activated when a configuration is loaded.
- Set Positioning Enabled : Activates or deactivates the function for changing the position of a virtual control with the finger.
- Set Resizing Enabled : Activates or deactivates the function for resizing a virtual control with the finger.
Configuration #
- Load Configuration : Load touch interface modifications from save file.
- Get Configuration : Get configuration in save file that contain touch interface modifications.
- Save Configuration : Save touch interface modifications in save file.
Property of virtual control and touch interface #
- Get Touch Interface Opacity : Get touch interface opacity values.
- Get Virtual Input Offset : Get current virtual control offset (FVector2D).
- Get Virtual Input Size Scale : Get current virtual control size scale (float).
- Set Touch Interface Opacity : Set touch interface opacity values.
- Set Virtual Input Offset : Set virtual control offset.
- Set Virtual Input Size Scale : Set virtual control size scale.
Utility #
- Get Selected virtual input name : Returns the name of the currently selected virtual control. Returns none if nothing is selected.
- Get List of Virtual Input : Returns an array with the names of all virtual controls.