2021-06-25 18:14:40 +02:00
|
|
|
import { writable } from "svelte/store";
|
2021-06-11 11:29:36 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A store that contains whether the game overlay is shown or not.
|
|
|
|
* Typically, the overlay is hidden when entering Jitsi meet.
|
|
|
|
*/
|
|
|
|
function createGameOverlayVisibilityStore() {
|
|
|
|
const { subscribe, set, update } = writable(false);
|
|
|
|
|
|
|
|
return {
|
|
|
|
subscribe,
|
|
|
|
showGameOverlay: () => set(true),
|
|
|
|
hideGameOverlay: () => set(false),
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export const gameOverlayVisibilityStore = createGameOverlayVisibilityStore();
|