Commit Graph
1 Commits
Author SHA1 Message Date
Milenko d90f84faa3 Add on-screen touch controls for the game on Android
An overlay over the game, from JoshRob297's halo-ce-touch, which ported
theLlamaNet's halo-ce-android: a stick, the controller's buttons with word
labels, swipe aiming, optional gyroscope aiming, the phone's vibration, and
an editor to move, resize, hide, copy, export and import the buttons. It
is player 1's controller, merged into port 0's state as the keyboard is.

Changes from the fork:

- The controls show only in a game. In the menus and during cinematics
  they hide and let the fingers through, so HiIAmMoot's menu touch
  (upstream #50) and its tap to skip work under them. The game tells the
  overlay through a new host import, host_touch_scene.
- They hide while a controller with a stick is connected, such as a
  handheld's built-in one, and never show without a touchscreen (a TV).
  The new setting input.touch_controls ("auto", "on", "off"; default
  "auto") overrides this. Hiding with a controller follows diegotorres00's
  upstream #58.
- Swipes that start in Android's edge-gesture zones do not turn the view,
  and a press shorter than a frame is held long enough for the game to see
  it, as HiIAmMoot suggested in the review of #58.
- The swipe is not the mouse's aiming, so it keeps the controller's aim
  assist.
- The phone vibrates from port 0's XInputSetState, so the game's own
  vibration setting applies and no game source changes. It vibrates only
  while the touch controls show.
- The fork's cheats menu and its built-in cheat buttons are left out.

Co-authored-by: JoshRob297 <99092299+JoshRob297@users.noreply.github.com>
Co-authored-by: theLlamaNet <107216990+theLlamaNet@users.noreply.github.com>
(cherry picked from commit 7bd7481bdede370558a3c93d286e37a9c24237bd)
(cherry picked from commit 5911e2312b6960de58dfa1cad2fefce1a17b97f7)
2026-10-10 00:59:59 +13:00