Add animation preferences menu

This commit is contained in:
James Babcock committed 2026-09-26 20:42:08 -07:00
1 parent e6ec542f56
commit f473855710
14 files changed
+106 -5

No files matched your search

+18
View File
@@ -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;
}