Skip to content

feat: individual settings to control user interaction#2779

Merged
Danielku15 merged 1 commit into
developfrom
feature/splitup-enableuserinteraction
Jul 10, 2026
Merged

feat: individual settings to control user interaction#2779
Danielku15 merged 1 commit into
developfrom
feature/splitup-enableuserinteraction

Conversation

@Danielku15

Copy link
Copy Markdown
Member

Issues

Fixes #2666

Proposed changes

Splitup of the central enableUserInteraction into more fine grained options.

  • enableSeekToClick controls whether a simple click scrubs the player to the beat at the clicked location
  • enablePlaybackRangeSelection controls whether a click+drag draws a user selection which defines the selected playback range.
  • bonus feature: resetPlaybackRangeOnClick controls whether a simple click clears the current selection. This is useful if a custom "clear" GUI button is shown. Allows the user to seek while keeping the selection.

Edge cases:

  • When having a selection and clicking to seek, we clamp the playback cursor to the playback range (e.g. clicking on a beat before the range, seeks to the start of the playback range).
  • We now only draw a new selection range if the user really click+drags to a full new selection spanning at least 2 beats. This prevents accidental clearing of the selection if you just click and drag a few pixels.

Overall this allows a more static playback range selection control:

  1. only allow drag selection based on custom UI (e.g. coupling it to looping, or asking the user explicitly to select a range after selecting the respective UI item)
  2. keep the user selection active and allowing seeking while the range is fixed. clearing via custom UI element.

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • New tests were added

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

@Danielku15 Danielku15 self-assigned this Jul 10, 2026
@Danielku15 Danielku15 merged commit 525f212 into develop Jul 10, 2026
5 checks passed
@Danielku15 Danielku15 deleted the feature/splitup-enableuserinteraction branch July 10, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Splitup enableUserInteraction

1 participant