Skip to content

Latest commit

 

History

History
56 lines (50 loc) · 1.97 KB

File metadata and controls

56 lines (50 loc) · 1.97 KB
title beatMouseDown
sidebar_custom_props
kind category since
event
Events - Player
0.9.7

import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature } from '@site/src/reference-commons'

This event is fired whenever a the user presses the mouse button on a beat.

<Signature style="block" js={[["keyword","readonly"],["whitespace"," "],["identifier","beatMouseDown"],["token",":"],["whitespace"," "],["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","Beat","/docs/reference/types/model/beat"],["token",">"],["token",";"]]} csharp={[["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","Beat","/docs/reference/types/model/beat"],["token",">"],["whitespace"," "],["identifier","BeatMouseDown"],["whitespace"," "],["token","{"],["whitespace"," "],["keyword","get"],["token",";"],["whitespace"," "],["token","}"]]} kotlin={[["keyword","val"],["whitespace"," "],["identifier","beatMouseDown"],["token",":"],["whitespace"," "],["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","Beat","/docs/reference/types/model/beat"],["token",">"]]} />

Examples

<Tabs defaultValue="javascript" values={[ { label: "JavaScript", value: "javascript"}, { label: "C#", value: "csharp"}, { label: "Android", value: "android"} ]}

```js const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab')); api.beatMouseDown.on((beat) => { startSelectionOnBeat(beat); }); ``` ```cs var api = new AlphaTabApi(...); api.BeatMouseDown.On(beat => { StartSelectionOnBeat(args); }); ``` ```kotlin val api = AlphaTabApi(...) api.beatMouseDown.on { beat -> startSelectionOnBeat(args) } ```