noteMouseDown
Description​
This event is fired whenever a the user presses the mouse button on a note head/number. This event is fired whenever a the user presses the mouse button on a note.
It is only fired if CoreSettings.includeNoteBounds
was set to true
because
only then this hit detection can be done. A click on a note is considered if the note head or the note number on tabs are clicked as documented in boundsLookup
.
- JavaScript
- C#
- Kotlin
noteMouseDown: IEventEmitterOfT<Note>;
IEventEmitterOfT<Note> NoteMouseDown { get; set; }
var noteMouseDown: IEventEmitterOfT<Note>
Examples​
- JavaScript
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.noteMouseDown.on((note) => {
api.playNote(note);
});
var api = new AlphaTabApi<MyControl>(...);
api.NoteMouseDown.On(note =>
{
api.PlayNote(note);
});
val api = AlphaTabApi<MyControl>(...)
api.noteMouseDown.on { note ->
api.playNote(note)
}