Commit Graph

6 Commits

Author SHA1 Message Date
lynxnb
e91993698f Remove OSC EditMode enum
An enum isn't needed anymore, as there's no state to enumerate anymore.
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
816599749b Fix Android Studio OSC layout preview (again)
The layout preview/editor doesn't instantiate an Application instance, therefore accessing `displayMetrics` from the app context would lead to a crash, and the view being mocked in the preview.
Additionally a default grid value is defined for `AlignmentGridView` to avoid a crash because of an invalid iteration step in the drawing loop.
2023-04-02 18:16:10 +02:00
lynxnb
88e6fc9888 Implement OSC snap to grid functionality 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
81eb8fd231 Rework OSC edit mode handling for better extensibility
Edit mode configuration parameters are now shared between the view and the buttons in a small `OnScreenEditInfo` object, avoiding variable duplication about edit state. The `editingTouchHandler` has also been simplified to only lookup the button if one wasn't being edited already.
2023-04-02 18:16:10 +02:00