forked from Blendman974/faceclaw
Add animation preferences menu
This commit is contained in:
1 parent
e6ec542f56
commit
f473855710
14 files changed
+106
-5
No files matched your search
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Whether menus and icon grids animate on the glasses (Settings > Display >
|
||||
* Animations > Menu animation). The motion classes can't read the settings
|
||||
* store themselves (it is native, and they load under Node in unit tests),
|
||||
* so ui/menu.ts installs a reader in each isolate that paints menus. Without
|
||||
* one, menus animate.
|
||||
*/
|
||||
export const MENU_ANIMATION_KEY = "display.menuAnimation";
|
||||
|
||||
let readMenuAnimation: () => boolean = () => true;
|
||||
|
||||
export function menuAnimationEnabled(): boolean {
|
||||
return readMenuAnimation();
|
||||
}
|
||||
|
||||
export function setMenuAnimationReader(read: () => boolean): void {
|
||||
readMenuAnimation = read;
|
||||
}
|
||||
Reference in new issue
Block a user