Skip to content

Splitup enableUserInteraction #2666

@Danielku15

Description

@Danielku15

Relates to #2658

Problem

Currently alphaTab has enableUserInteraction controls all user interface (click handling) related functionalities:

  • Seek-To-Click: When a user clicks or taps we seek to the closest beat at at the clicked position.
  • Select Playback Range: When a user clicks and drags (mouse only for platforms beside android) we select the respective range visually. When the selection ends, we set the playback range.

This doesn't allow the fine-grained configuration some apps might want to do. The main usecase is to disable selecting a playback range if looping is disabled. But also in cases where integrators want to implement a more special logic themselves, this is not possible.

Solution

Part 1: individual options

The most important part it to splitup enableUserInteraction to two individual properties. enableSeekToClick and enablePlaybackRangeSelection which control the respective features.

enableUserInteraction has to stay for backwards compatibility. it is false if any of the two options is not true. and setting a value will set both underlying values. Additionally we mark this option as deprecated. It will change from a simple property to a getter/setter combination.

Part 2: user interaction events

We have to double check and ensure that we the beatMouseUp, beatMouseDown and beatMouseMove still work as expected. The events should be always active and fired, regardless of any flags. In case somebody wants to implement a custom UI logic, they have these events available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-coreRelated to some core parts of alphaTabplatform-allAffects all platformsstate-acceptedThis is a valid topic to work on.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions