Forums » Suggestions

[Mobile] Touch-to-place for default touch controls

Aug 26, 2026 draugath link
As a means to give players greater control over the touch controls in the official game client, I think it could be beneficial to incorporate the Touch-To-Place interface from DroidButtons for the simple placement of a select number of controls.

I envision this would be most useful for moving the discrete touch regions such as Up/Forward, Down/Reverse, Turbo, Brake, Primary Trigger, Secondary Trigger, and maybe the menu buttons at the bottom center.

In the Movement/Placement section of Options, each supported region would have two buttons: Place and Reset.

The DroidButtons Touch-To-Place interface is defined in the file `ui_edit.lua` in the function `show_placement_interface()`.

`show_placement_interface()` receives a bunch of arguments that it needs for my universal update function as well as for passing information back to the edit interface, in case the player wants to tweak the placement by a few pixels before saving. This could probably be simplified by just passing the name or regionid and directly updating positions.

`show_placement_interface()` operates by using a full-screen region with a z-order low enough to prevent touches from activating any other existing regions and a second full-screen region below the first one to attempt to trap and prevent accidental double-taps from also activating any other regions. It also has two smaller button-type regions that serve as save and cancel buttons.

The functions `place_func()`, `save_func()`, and `cancel_func()` are called directly by the TOUCH_RELEASED event.

`place_func()` operates using the X-percent and Y-percent event returns since I wasn't aware of the pixel values at the time.