Emscripten: Rework touch input and shell layout - #3556
Conversation
|
Jenkins: Test this please Thanks! Have to take a look at this :) |
|
Pushed a follow-up batch from the same setup: a save manager! Fits nicely into the design. Updated the description above accordingly. 🙂 |
|
Hello, since you are working on the touch screen buttons for the weblpayer, maybe consider taking a look at this proposal from a user called Bilou Master Joke: https://codepen.io/editor/BilouMaster/pen/019edf09-20e1-73a0-8efa-3ccb9a832518 He made a bunch of suggestions to both support the complete vanilla keyboard, and some quality of life usage of buttons. |
|
@jetrotal Thanks for the input! Honestly, it feels a bit rough, but it's a draft anyway. Worth digging into for a future iteration after this PR. (It already touches a lot of parts of the shell.) |
|
Ah yes, that's perfect because I've been doing the design only like an empty shell and not finished/merged with the real player yet, so I'll also take inspiration of your work then! :D You can check the codepen Jetrotal shared (most recent take) or my old previous player which had better layout too but not commutable/customisable yet I like your buttons for importing save files or toggle between perfect pixel/not perfect, that's a good point but they are small and too close to each other, it would likely need a bit scale up + more margin but 👍 |
|
@BilouMaster Love the input. 🙏 Yeah sure! Maybe we can collaborate on the implementation. My take: Giving users too much customization options clutters interfaces. I prefer a unified polished interface in general. But that's personal preference, eh. On the buttons – good catch. The icon controls had too little spacing between them (due to my buttons control unification in this PR). I've improved every tap target and given the control row more room. |
|
The customisation costs nothing and I'm planning to set the perfect ratio by default so the customisation will just be a fallback for accessibility and non anticipated cases like non conventional devices, I feel it's safer to add some free settings beside the way we think it's good. The swap Enter/Echap have been demanded many times for example Sure we can collaborate on this, I will clone your branch (or the merged in official if the pr is accepted) when I'll have time to re-work on this, I've had many other things to do lastly :) Let's build the perfect controller together, this big beauty of a project needs it :D |
|
First thanks for the contribution. Some remarks: Emscripten: Add pixel-perfect integer scaling toggle: this is already supported native in the settings scene. Maybe make the button open the settings scene instead? Emscripten: Fix canvas scaling on load and orientation change: Have to check if SDL3 still needs this Emscripten: Add save manager, fullscreen toggle, and SVG icon sprite: honestly for this one and the follow up commits I would prefer a 2nd PR (based on this one). This is quite complex and I don't really like that hooking of the private API instead of impending this properly in pre/post.js. The scaling factor of the screenshot is also available as a setting in the settings scene btw. |
1c5c5f8 to
b96301b
Compare
|
Thanks for the review! I agree, the PR mixed concerns. Refactored:
|
b96301b to
3b7b8fc
Compare
|
Jenkins: test this please Thanks this looks more reasonable for the PR now. Will test it a bit tomorrow - also regarding SDL3 behaviour - and then this should be good to go. |
|
Thanks a lot! Looking forward to your tests. 🙂 Follow-up created (based on this one): #3643 |
This PR brings the web-shell improvements from my production setup on realtroll.de – touch and layout work that's been running there a while.
Per review, reduced to the shell rework itself: the integer scaling toggle is gone (covered natively by the settings scene), and the save manager moved to a follow-up PR based on this one.
What's in:
visibilitychangeso the screen doesn't sleep mid-session..wasm).scanGamePadspoll (ongamepadconnectedpredates WASM in every browser).