georgefst / monpad

A fully-customisable web-based gamepad, designed to be used from smartphones.
BSD 3-Clause "New" or "Revised" License
39 stars 5 forks source link

A way to change the whole screen #16

Closed CPTblackadder closed 3 years ago

CPTblackadder commented 3 years ago

The server should be able to change the layout of a clients screen.

This would allow the ability to add a menu button that can go to various sub menus to change configuration, all directed by the server.

It may also be desirable to have a controller be able to also change it's screen in someway. This could be used to alternate between different forms of the same kind of control (i.e. dpad vs analog stick)

georgefst commented 3 years ago

The server should be able to change the layout of a clients screen.

This should actually be quite easy to do. We already have decoders and stuff for the Layout type. This should basically be a case of adding a SetUpdate (Layout () ()) field to ServerUpdate, then following the errors. Latency might be bad, but it's hard to know until we try it.

I'll look in to it on Sunday. I'm rather busy right now (as you well know...).

georgefst commented 3 years ago

Actually, there will need to be non-trivial changes to the frontend, which doesn't currently expect e.g. the set of analog stick names, to ever change. But it shouldn't be too bad.

georgefst commented 3 years ago

It may also be desirable to have a controller be able to also change it's screen in someway. This could be used to alternate between different forms of the same kind of control (i.e. dpad vs analog stick)

I'm not quite sure what you mean?