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
input: allow mapping buttons to touchscreen #5163
Conversation
Hello and thanks for the contribution!
Regarding the UI, I would suggest something like...
Profile: [My mapping v] [New] [Delete] [Rename]
------------------ horizontal rule ----------------------
Double click to change a field. [Add] [Delete]
And you can just get rid of the [Edit] button as it is pretty much redundant.
I think this will work better as the Add
button is closer to the table, but I'm not exactly good at UI designing either...
Thanks for the review and suggestions! Fixed most of the issues. |
I played around with it a bit and found some UI bugs:
|
Implemented the suggestions and made ok/cancel work predictably through both dialogs by keeping current state in the motion/touch dialog and passing it to the mapping dialog. |
@zhaowenlan1779 Can you have a second look, and eventually approve this PR, please |
Property "overflow" isn't documented, and it makes Qt complain about an unknown property in the terminal.
@zhaowenlan1779 can you give this another review, so we can merge this soon? |
Thanks a lot for your hard work! Comments are mostly just nitpicking. UI looks really great, I'll try this out tomorrow!
} | ||
} | ||
|
||
void TouchScreenPreview::HighlightDot(const int id, const bool active) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to simplify this to HighlightDot(id)
which highlights that dot and de-highlight other dots?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would require either additionally keeping selection state or unnecessarily applying stylesheets, which could be slow according to some reports. I think the current form fits better: since the model keeps track of selection, this function is compatible with the model's behavior of adding to and removing from selection independently.
There will be a option to add mutiple buttons to do one action |
@zhaowenlan1779 Thanks! Fixed most of the issues. @RianCaio Yes, the configuration doesn't prevent several entries with equal coordinates. You can simply drag points on top of each other. |
No I a saying Two button to one action example ZR+Y To map button 2 in oot3d |
Good idea, but I think it's better to leave that for another PR. |
i dont think it would be a dificult change |
I still think doing one feature at a time and trying to keep PRs smaller is better. So this could be a nice follow up PR |
yeah seeing that way make prs smaler and easy to see if any error happens |
Please Add Multiple Buttons at the same mapping |
This change creates an additional TouchDevice, TouchFromButtonDevice, which uses a list of mappings between ButtonDevices and screen coordinates. If enabled, this device is polled in the HID module along with the regular one to allow both free and preset inputs.
Addresses #3494, #4261.
Mapping lists are maintained separately from input profiles to allow per-game setup. Device is configured by assigning one of the mappings to the input profile. Relevant qt-config.ini entries:
GUI screenshots:
This change is