Skip to content

docs(sdk7): document TouchScreenControls and UiInputBinding for custom mobile controls#122

Open
EibrielInv wants to merge 10 commits into
mainfrom
feature/custom-controlls
Open

docs(sdk7): document TouchScreenControls and UiInputBinding for custom mobile controls#122
EibrielInv wants to merge 10 commits into
mainfrom
feature/custom-controlls

Conversation

@EibrielInv

Copy link
Copy Markdown

What

Adds SDK7 creator docs for the new custom mobile-controls components:

  • On-screen Controls (TouchScreenControls) — creator/sdk7/interactivity/touch-screen-controls.md: hide the joystick/crosshair, change the central button action, hide/re-icon buttons.
  • UI Input Binding (UiInputBinding) — creator/sdk7/2d-ui/ui_input_binding.md: bind InputActions to your own UI elements via the uiInputBinding JSX prop.

Also:

  • SUMMARY.md nav entries (Interactivity + 2D UI groups)
  • Cross-links from building-for-mobile/input-on-mobile.md
  • Screenshots under creator/images/touch-controls/

Notes

  • Component/property names verified against the protocol .proto and generated SDK bindings.
  • The uiInputBinding JSX prop lands in js-sdk-toolchain; docs include an imperative fallback for older SDK versions.

@rodrigo685 rodrigo685 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add both images in https://docs.decentraland.org/creator/~/revisions/G3sbEgsK7q0Z006DrL74/scenes-sdk7/building-for-mobile/input-on-mobile so it's easy to visually grasp / understand both the static controls and what's possible with custom (so they can then go check the specific sections)

For the full input model, see [Click events](../interactivity/button-events/click-events.md). This page focuses on what is mobile-specific.

## What touch maps to

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add creator/images/touch-controls/touch-controls-default.jpg here

Image

## Customizing the on-screen controls

Scenes can reconfigure these on-screen controls — hide the joystick or crosshair, change what the central button does, re-icon buttons, or replace them with custom UI. See [On-screen Controls](../interactivity/touch-screen-controls.md) and [UI Input Binding](../2d-ui/ui_input_binding.md).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add image here

Image

EibrielInv and others added 6 commits July 13, 2026 18:54
…ty-stack behavior

Address review feedback on #122: show the default and customized on-screen
controls on the mobile-input overview page.

Also update the docs for the shipped joypad behavior (priority stack):
- jump is hideable; hiding a button cascades the rest up
- the central button is the first visible action; mainAction moves an action
  to the front
- the "+" overflow menu appears only when more than four buttons are visible

Add a "How the button layout works" section to touch-screen-controls.md and
revise the mainAction / hide property docs accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rewrite the three mobile custom-controls pages toward a more instructional,
visual style: condition->outcome tables (button layout, action mapping,
properties), {% hint %} callouts for caveats and tips, task-oriented headings
with labeled code snippets, and descriptive figure captions.

No technical changes — component/property/InputAction names and the
priority-stack behavior are unchanged. Adds specs for three proposed
explanatory diagrams (button-layout-stack, hide-jump-cascade,
overflow-plus-menu) as a TODO callout for a designer to produce.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…en mobile guidance

- Replace the proposed-diagram TODO with a real figure (control-ordering.jpg)
  showing how the gamepad reflows as the visible-button count changes
  (7 → overflow behind "+", 5 → shorter column, 4 → no "+").
- Hyperlink every prose mention of InputAction to its definition
  (click-events.md#pointer-buttons) and link the react-ecs UI elements
  (UiEntity / Button / Label) to the Onscreen UI docs.
- Reduce the redundant "Inputs to avoid" section to a concise
  "Choosing reachable actions" paragraph that points to the mapping table
  and the customization section instead of repeating them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…buttons

The arc has four slots and the "+" occupies one, so five buttons fit directly
(central + four). The "+" only appears for a sixth button. Update the button-
layout table and the surfacing tip from ">4" to ">5" to match the implementation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The TouchScreenControls `icon` field is now a TextureUnion instead of a plain
string. Update the property row and both code examples to the texture-variant
shape, and note that only content-mapped scene paths are supported (no external
URLs, avatar or video textures), matching the client implementation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ng in UI reference

- Point the TouchScreenControls `icon` type to the UI texture object docs
  (ui_background#background) instead of the 3D materials page.
- List `uiInputBinding` among the available UiEntity components in onscreen-ui,
  so the JSX binding prop is discoverable from the main 2D-UI reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Controls Customization: Update Mobile Creator Docs with Controls Customization V1

2 participants