Commit Graph

141 Commits

Author SHA1 Message Date
Henrik Rydgård
758776f216 Touch control layout: Make sure no buttons are initialized off screen.
Fixes #19486
2024-09-26 11:08:07 +02:00
Henrik Rydgård
047913ddd3 Make sure we don't try to use out-of-bounds icons/shapes for custom buttons 2024-09-15 12:11:39 +02:00
Katharine Chui
d7fd44280a allow binding custom right stick to analog 2024-07-16 16:06:13 +02:00
Henrik Rydgård
f42f7ac9d1 Touch controls on iOS: Move the three center button up slightly by default to avoid the task switcher 2024-05-26 09:39:44 +02:00
Henrik Rydgård
c5791764d8 Make the i18n T function use std::string_view
Buildfixes, crashfixes

One more

Android buildfix

Buildfix Qt
2024-02-12 18:44:39 +01:00
Henrik Rydgård
5a7db8aa11 Fix issue with touch control editor with no game running. Fixes #18652 2023-12-31 01:04:14 +01:00
Henrik Rydgård
679b8330ff Add bindings for toggling mouse control and touch screen controls. Not bound by default.
I think I'll find myself using both of these for testing, feel worthwhile.

Suggested in #18464
2023-12-29 17:40:57 +01:00
Henrik Rydgård
63181374c7 Finish previous commit 2023-12-29 17:24:15 +01:00
Henrik Rydgård
4609df40c9 Update gamepad opacity once per frame, not once per button 2023-12-29 17:09:38 +01:00
Herman Semenov
95f535dab0 [UI/Windows] Object out of scope optimization for better codegeneration (lower level scope) 2023-12-20 12:35:02 +03:00
Henrik Rydgård
72be2f5459 Restore the D-Pad behavior (see #18028) 2023-09-11 11:41:29 +02:00
iota97
01083c87ea Analog stick gesture 2023-09-01 09:32:21 +02:00
Henrik Rydgård
ce47055860 Touch controls: Add an option for "Sticky D-Pad".
Will make it a lot easier to pull off certain moves in fighting games.

Should help #17950
2023-08-31 22:37:11 +02:00
Henrik Rydgård
6a61a58b9f Simplify the touch d-pad code.
Due to #17950 I had a look at this code and found some room to simplify,
but I don't think this is likely to fix anything.
2023-08-31 11:03:14 +02:00
Henrik Rydgård
d924b742c0 Make the rapid-fire interval configurable
Rapid-fire works by holding down the button mapped for Rapid-Fire. Once
that's held, the PSP face buttons, L, R and Start will be repeated while
held.

With this new setting, you can change the repeat interval from the
default of 5 frames.

The interval is specified as frames rather than as milliseconds or
something because that often maps better to game logic.
2023-07-23 11:49:25 +02:00
Henrik Rydgård
73836e7bcb Custom buttons: Store them in an array, remove as many count restrictions as possible. 2023-06-20 10:42:53 +02:00
Henrik Rydgård
e078f61bad Rename class CustomKey to CustomButton 2023-05-08 10:13:52 +02:00
Henrik Rydgård
ee6234ecb6 I18N: Switch to getting categories by index instead of by string lookup
Also gets rid of the shared_ptr usage, and generally makes things nicer.

Needed for later config refactorings, good to get in early.
2023-04-07 10:35:01 +02:00
Henrik Rydgård
04d3d3111c Clean up __Ctrl button functions. 2023-04-01 08:55:45 +02:00
Henrik Rydgård
a4bfb83982 Some more renaming 2023-03-28 00:23:18 +02:00
Henrik Rydgård
5c36aec484 More renaming 2023-03-26 11:21:34 +02:00
Henrik Rydgård
e1ff498ba3 Rename "Combo" to "Custom" in the touch key mappings.
Need the name "Combo" for the new feature from PR #17168.
2023-03-26 11:05:39 +02:00
Henrik Rydgård
d3955b42bb Rename some system functions, merge the Launch* ones.
android launchurl buildfix
2023-03-21 12:22:59 +01:00
Henrik Rydgård
8b431b39ba
Wrap the display globals in a struct (#16998)
* Wrap the display globals in a struct

Makes it easier to search/replace these, for future refactorings.

* Some renaming

* Qt buildfix, also fix the Qt build on Mac (got broken with battery changes)

* Attempt at buildfixing ios

* UWP buildfix
2023-02-25 13:09:44 +01:00
Henrik Rydgård
a9a45481cc Scale buttons by 1.5 instead of 2.0 on touch.
Not sure if this should really be a setting. If you don't like the
scaling at all, you can still choose the glow style. We should probably
somehow make that one more obvious though.
2023-02-08 21:54:15 +01:00
Henrik Rydgård
59dec197d8 Add previews for more types, fix mappings. 2023-02-02 01:09:33 +01:00
Henrik Rydgård
f2b5f06dac
Merge pull request #16450 from unknownbrackets/touch-right-analog
UI: Fix right analog with single button
2022-11-28 01:00:16 +01:00
Unknown W. Brackets
247848891e UI: Dry out code and check bounds to be safe. 2022-11-27 15:40:55 -08:00
Unknown W. Brackets
89aeb2484e UI: Fix right analog with single button.
Release first, then press so that we press when the opposing direction is
mapped to the same button.
2022-11-27 15:32:56 -08:00
Henrik Rydgård
689860b3a0 Qt buildfix, apply feedback 2022-11-27 17:33:15 +01:00
Henrik Rydgård
0a3d78221e Fix drag-background-through-buttons problem by adding "touch exclusive" mode to viewgroups.
Not using universally because I don't want to debug all the issues...
2022-11-27 16:16:18 +01:00
Henrik Rydgård
5230fc7c41 Joystick input: Ignore in-deadzone events from a different device than previous events
Fixes #15465
2022-11-23 12:22:59 +01:00
iota97
e48ea158e4 Allow to repeat a "single" button 2022-06-19 15:18:05 +02:00
Henrik Rydgård
20c3c8f291
Merge pull request #14848 from iota97/dpad-size-fix
Fix DPAD size calculation
2021-11-20 15:58:56 +01:00
iota97
fc7033318f Fix dpad analog overlap interaction 2021-09-21 10:35:39 +02:00
Henrik Rydgård
c333e2b879
Merge pull request #14480 from iota97/analog-head
Configurable analog head size
2021-09-13 22:39:18 +02:00
iota97
5bf0068ea6 Fix DPAD size calculation 2021-09-13 22:25:46 +02:00
iota97
4ec1a8d12a Allow drag over touch DPAD and avoid analog drag to trigger other button 2021-09-13 14:30:15 +02:00
iota97
f417bb93d4 Reuse translation 2021-08-30 13:13:09 +02:00
iota97
2821035b1d Support virutal button in touch gesture 2021-08-30 12:26:13 +02:00
Henrik Rydgård
1d29060c3b
Merge pull request #13107 from iota97/touch-gesture
Basic mappable motion gesture
2021-08-29 21:39:42 +02:00
Henrik Rydgård
58e7b6bec2 Tweak defaults some more (no L2 on xbox pads..). Minor code cleanup. 2021-08-28 20:06:05 +02:00
iota97
de68436084 Configurable analog head size 2021-08-21 21:24:14 +02:00
Henrik Rydgård
928bc88b01 Rename Unthrottle to Fast-forward globally 2021-08-18 09:28:13 +02:00
iota97
ad29e5237e Basic mappable gesture 2021-08-17 09:17:37 +02:00
iota97
bac96bd47c Allow to disable right analog diagonal 2021-08-07 12:47:50 +02:00
iota97
0ae0d30751 Allow to invert context dimension for combo button 2021-08-04 09:18:23 +02:00
Henrik Rydgård
c6ad871865 Warning fix 2021-07-19 10:31:28 +02:00
iota97
498878267a Customizable touch control (rebased with label) 2021-07-11 09:55:25 +02:00
Henrik Rydgård
cd8cfcfcd7 Merge __CtrlSetAnalogX/Y into one function. Always called together. 2021-07-09 10:41:26 +02:00