From 81ebe04dd27566d730d71a9824a7794c807e2909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20Sch=C3=BCrz?= Date: Mon, 6 Jan 2025 14:46:54 +0100 Subject: [PATCH] Add 125% speed too --- .../common/src/editor/bottomBar/PlayButton.ts | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/packages/common/src/editor/bottomBar/PlayButton.ts b/packages/common/src/editor/bottomBar/PlayButton.ts index 838c7d4f..a196abdc 100644 --- a/packages/common/src/editor/bottomBar/PlayButton.ts +++ b/packages/common/src/editor/bottomBar/PlayButton.ts @@ -63,26 +63,11 @@ export class PlayButton extends CompositeDrawable { text: 'Playback rate', disabled: true, }), - new MenuItem({ - text: '150%', - action: () => this.editorClock.rate = 1.5, - }), - new MenuItem({ - text: '100%', - action: () => this.editorClock.rate = 1, - }), - new MenuItem({ - text: '75%', - action: () => this.editorClock.rate = 0.75, - }), - new MenuItem({ - text: '50%', - action: () => this.editorClock.rate = 0.5, - }), - new MenuItem({ - text: '25%', - action: () => this.editorClock.rate = 0.25, - }), + ...[1.5, 1.25, 1, 0.75, 0.5, 0.25].map(speed => + new MenuItem({ + text: `${speed * 100}%`, + action: () => this.editorClock.rate = speed, + })), ], e); return true; }