diff --git a/How-to-create-custom-touch-control-layout.md b/How-to-create-custom-touch-control-layout.md index 96e5aef..301962f 100644 --- a/How-to-create-custom-touch-control-layout.md +++ b/How-to-create-custom-touch-control-layout.md @@ -134,3 +134,42 @@ BX_EXPOSED.test_touch_control( ) ``` 6. Use the [Touch Adaptation Kit documentation](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/system/overviews/game-streaming/game-streaming-touch-touch-adaptation-kit-overview) to design your own layout. You can also look at [other custom layouts](https://github.com/redphx/better-xcloud/tree/gh-pages/touch-layouts/layouts) for references. +7. Pass your modified layout to the `BX_EXPOSED.test_touch_control()` function to update it. Do this step again and again until you satisfy with the result. + +## Submit layout +1. Fork the [`gh-pages`](https://github.com/redphx/better-xcloud/tree/gh-pages) branch: + +2. Create two files: `.json` and `layouts/.json` +- ⚠️ Use [DuckDuckGo's JSON Beautifier tool](https://duckduckgo.com/?t=ffab&q=format+json&ia=answer) (indent with 2 spaces) to beautify & validate the JSON contents first. +- `.json`: + - To find the value of `XBOX_TITLE_ID`: + 1. Find the game on [dbox.tools](https://dbox.tools). [Here](https://dbox.tools/store/products/9PLZPHBNHTMF/) is the page for DOOM 1993. + 2. Copy the value in `Title ID` row (Doom 1993 = `60A2D9F6`). + 3. [Convert that value into decimal](https://www.rapidtables.com/convert/number/hex-to-decimal.html) and you get your `XBOX_TITLE_ID` value. For DOOM 1993 it's `1621285366`. + - File template: +```json +{ + "name": "GAME NAME", + "default_layout": "LAYOUT_ID", + "layouts": [ + "LAYOUT_FILE_NAME" + ] +} +``` +- `layouts/.json`: + - File template: +```json +{ + "schema_version": 1, + "layouts": { + "LAYOUT_ID": { + "name": "Layout Name", + "content": {...} + } + } +} +``` +3. Create your pull request including the screenshot of the layout. Chrome/Edge has a built-in screenshot feature: +Screenshot 2024-03-10 at 10 39 49 + +That's the basic of it. I'll update with more details later. \ No newline at end of file