Commit Graph

16 Commits

Author SHA1 Message Date
lynxnb
32f995165c Use 1.0 as the default OSC button scale value
The default value was previously 1.15.
2023-05-02 12:27:57 +01:00
lynxnb
560fcd9442 Implement toggle mode for OSC buttons
When toggle mode is enabled, the button will toggle between the `Pressed` and `Released` state when it's pressed.

Without toggle mode:
ACTION_DOWN -> Pressed
ACTION_UP -> Released
ACTION_DOWN -> Pressed
ACTION_UP -> Released

With toggle mode:
ACTION_DOWN -> Pressed
ACTION_UP -> No event
ACTION_DOWN -> No event
ACTION_UP -> Released
2023-05-02 12:27:57 +01:00
lynxnb
d7e38e9556 Introduce a control panel to edit buttons instead of a fab bar
An unusual big commit, unfortunately needed because none of these changes would make sense nor work individual. A quick list of what have been done follows.
* Introduced a control panel to control buttons replacing the FAB bar
* `ConfigurableButton` and `OnScreenConfiguration` interfaces have been introduced to allow for easier proxying of actions when applying the same changes to all buttons
* Button resize logic has been stripped from the buttons in favor of the new sliders
* General cleanup and renaming of various methods to better reflect their functionality
2023-05-02 12:27:57 +01:00
lynxnb
a799cb63f1 Add separate L3 and R3 buttons to OSC
As part of this commit, a `defaultEnabled` property was added to `OnScreenButton` to determine the default visibility of buttons. This is required because L3 and R3 should be hidden by default and only enabled by the user on demand.
Additionally, the buttons' mask values were added to `ButtonId` members, as adding entries in the middle of the class conflicted with the `ordinal` enum property, making it unfit to use for our purposes.
Finally, the `ControllerType` class was extended with an array of optional buttons. Optional buttons represent buttons that are allowed to be displayed on screen, but shouldn't be included in the controller mapping activity.
2023-04-02 18:16:10 +02:00
lynxnb
acdf4e6823 Introduce constants for default OSC config values 2023-04-02 18:16:10 +02:00
lynxnb
88084016a1 Implement OSC per-button scale functionality 2023-04-02 18:16:10 +02:00
lynxnb
c4d0d02509 Simplify OnScreenConfiguration
`ControllerConfigurationDummy` was removed as it isn't needed anymore, and the remaining classes simplified.
2023-04-02 18:16:10 +02:00
lynxnb
b724bc2309 Adjust default OSC opacity and color 2023-03-05 12:45:07 +01:00
KikiManjaro
1282362fce Add color selection to OSC
* Add bold text and antialiasing for osc buttons
* Fix osc dpad and button position (widder than taller)
* Set default OSC color to white background with black text
2023-03-05 12:45:07 +01:00
lynxnb
cfa5f0e030 Fix OSC alpha not changing on button press 2022-08-20 17:00:40 +02:00
KikiManjaro
3407f6d530 Add OSC opacity adjustment 2022-08-20 13:46:17 +02:00
Willi Ye
4b53a3b1a6 Enable full screen on resume
* Fix registering of buttons pairs in OSC with multiple fingers
* Enable OSC by default
* Increased OSC scale by default
2021-06-17 20:30:22 +05:30
Willi Ye
f479aeb4ac Add comments 2020-11-12 22:19:55 +05:30
Willi Ye
7526a985fb Use property delegate to handle preferences
* Add option to disable joystick recentering
2020-11-12 22:19:55 +05:30
Willi Ye
5c4aa95da6 Add on screen controls layout edit settings 2020-11-12 22:19:55 +05:30
Willi Ye
3057e4b29a Add on screen controls
* Fix missing default constructor for dialog fragments
2020-11-12 22:19:55 +05:30