partey_workadventure/front/src/Stores/UserInputStore.ts

12 lines
427 B
TypeScript
Raw Normal View History

import { derived } from "svelte/store";
import { menuInputFocusStore } from "./MenuStore";
import { chatInputFocusStore } from "./ChatStore";
//derived from the focus on Menu, ConsoleGlobal, Chat and ...
export const enableUserInputsStore = derived(
[menuInputFocusStore, chatInputFocusStore],
([$menuInputFocusStore, $chatInputFocusStore]) => {
return !$menuInputFocusStore && !$chatInputFocusStore;
}
);