mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-10 06:01:28 +08:00
added sound on click to the command line
This commit is contained in:
parent
44395ac314
commit
a2086f451d
1 changed files with 42 additions and 0 deletions
|
|
@ -69,6 +69,15 @@ let commands = {
|
|||
showCommandLine();
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "changeSoundOnClick",
|
||||
display: "Change sound on click...",
|
||||
subgroup: true,
|
||||
exec: () => {
|
||||
currentCommands.push(commandsSoundOnClick);
|
||||
showCommandLine();
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "toggleSmoothCaret",
|
||||
display: "Toggle smooth caret",
|
||||
|
|
@ -393,6 +402,39 @@ let commandsKeymapMode = {
|
|||
],
|
||||
};
|
||||
|
||||
let commandsSoundOnClick = {
|
||||
title: "Change sound on click...",
|
||||
list: [
|
||||
{
|
||||
id: "setSoundOnClickOff",
|
||||
display: "off",
|
||||
exec: () => {
|
||||
setPlaySoundOnClick("off");
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "setSoundOnClick1",
|
||||
display: "1",
|
||||
exec: () => {
|
||||
setPlaySoundOnClick("1");
|
||||
},
|
||||
hover: () => {
|
||||
clickSounds["1"][0].play();
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "setSoundOnClick2",
|
||||
display: "2",
|
||||
exec: () => {
|
||||
setPlaySoundOnClick("2");
|
||||
},
|
||||
hover: () => {
|
||||
clickSounds["2"][0].play();
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
let commandsRandomTheme = {
|
||||
title: "Change random theme...",
|
||||
list: [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue