-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API to get user input mechanisms (ie: touchscreen? gamepad? keyboard?) #12264
Comments
Suggestion: Split the input methods into two to introduce priorities.
|
I was thinking about having |
The addition of expanded keyboard and touch information would be a relevant addition to a PR to fix this (Like full keyboard, and touch location) |
Some games that I have played show help info for the last input method touched. So if you touch a gamepad, then your currently-used input method is a gamepad. If you touch a keyboard, then you are now using a keyboard input method. |
I think the "has" X/Y/Z thing could be a bitwise now that Lua supports these, much like how keyboard input controls offers a bitwise variant of a function (plus, it'd be easier in the C++ code to use bitwise for that). Or just indexed into a child table like EDIT: Now that I think about it, a bitwise might not be preferred since this is kind of a C/++-ism. Maybe though for consistancy we can offer a bitwise-specific function like That, and |
I also think that moving these options into another It might feel weird to have player input methods in a function called |
Yeah the intention was for this to be a new method rather than part of get_player_window_information |
Done by #14092, no? |
Problem
Currently, mods need to create user interfaces for all devices without being able to customise for an input method. Knowing whether the client has a touchscreen for controls/gui is useful for scaling up GUIs.
This will also be required by #8679
Solutions
In the future, it's likely to be possible for a laptop to use touchscreen controls, and a phone to use a bluetooth keyboard.
I'd like to design the API well. I suggest something like the following information:
This could be a new API
The only unambiguous value here is
has_touchscreen_controls
: the touchscreen controls are either enabled or not. The rest could be problematic - it's possible to have both a keyboard/mouse and gamepad connected, but only the former used.Alternatives
...
Additional context
Related: #10632
The text was updated successfully, but these errors were encountered: