added sound on click to the command line

This commit is contained in:
Jack 2020-08-25 06:37:33 +01:00
parent 44395ac314
commit a2086f451d

View file

@ -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: [