Exemplo n.º 1
0
        private void load(FrameworkConfigManager config, GameHost host)
        {
            window = host.Window;
            config.BindWith(FrameworkSetting.SizeFullscreen, sizeFullscreen);
            config.BindWith(FrameworkSetting.WindowMode, windowMode);
            currentWindowMode.Text = $"Window Mode: {windowMode}";

            if (window == null)
            {
                return;
            }

            supportedWindowModes.Text = $"Supported Window Modes: {string.Join(", ", window.SupportedWindowModes)}";

            // so the test case doesn't change fullscreen size just when you enter it
            AddStep("nothing", () => { });

            var initialWindowMode = windowMode.Value;

            // if we support windowed mode, switch to it and test resizing the window
            if (window.SupportedWindowModes.Contains(WindowMode.Windowed))
            {
                AddStep("change to windowed", () => windowMode.Value = WindowMode.Windowed);
                AddStep("change window size", () => config.GetBindable <Size>(FrameworkSetting.WindowedSize).Value = new Size(640, 640));
            }

            // if we support borderless, test that it can be used
            if (window.SupportedWindowModes.Contains(WindowMode.Borderless))
            {
                AddStep("change to borderless", () => windowMode.Value = WindowMode.Borderless);
            }

            // if we support fullscreen mode, switch to it and test swapping resolutions
            if (window.SupportedWindowModes.Contains(WindowMode.Fullscreen))
            {
                AddStep("change to fullscreen", () => windowMode.Value = WindowMode.Fullscreen);
                testResolution(1920, 1080);
                testResolution(1280, 960);
                testResolution(9999, 9999);
            }

            // go back to initial window mode
            AddStep($"revert to {initialWindowMode.ToString()}", () => windowMode.Value = initialWindowMode);

            // show the available displays
            AddStep("query Window.Displays", () =>
            {
                var displays = window.Displays.ToArray();
                Logger.Log($"Available displays: {displays.Length}");
                displays.ForEach(display =>
                {
                    Logger.Log(display.ToString());
                    display.DisplayModes.ForEach(mode => Logger.Log($"-- {mode}"));
                });
            });

            AddStep("query Window.Display", () => Logger.Log(window.Display.ToString()));

            AddStep("query Window.DisplayMode", () => Logger.Log(window.DisplayMode.ToString()));
        }
Exemplo n.º 2
0
        private void load(FrameworkConfigManager config)
        {
            Resources = new ResourceStore <byte[]>();
            Resources.AddStore(new NamespacedResourceStore <byte[]>(new DllResourceStore(@"osu.Framework.dll"), @"Resources"));

            Textures = new TextureStore(Host.CreateTextureLoaderStore(new NamespacedResourceStore <byte[]>(Resources, @"Textures")));
            Textures.AddStore(Host.CreateTextureLoaderStore(new OnlineStore()));
            dependencies.Cache(Textures);

            var tracks = new ResourceStore <byte[]>();

            tracks.AddStore(new NamespacedResourceStore <byte[]>(Resources, @"Tracks"));
            tracks.AddStore(new OnlineStore());

            var samples = new ResourceStore <byte[]>();

            samples.AddStore(new NamespacedResourceStore <byte[]>(Resources, @"Samples"));
            samples.AddStore(new OnlineStore());

            Audio = new AudioManager(Host.AudioThread, tracks, samples)
            {
                EventScheduler = Scheduler
            };
            dependencies.Cache(Audio);

            dependencies.CacheAs(Audio.Tracks);
            dependencies.CacheAs(Audio.Samples);

            // attach our bindables to the audio subsystem.
            config.BindWith(FrameworkSetting.AudioDevice, Audio.AudioDevice);
            config.BindWith(FrameworkSetting.VolumeUniversal, Audio.Volume);
            config.BindWith(FrameworkSetting.VolumeEffect, Audio.VolumeSample);
            config.BindWith(FrameworkSetting.VolumeMusic, Audio.VolumeTrack);

            Shaders = new ShaderManager(new NamespacedResourceStore <byte[]>(Resources, @"Shaders"));
            dependencies.Cache(Shaders);

            var cacheStorage = Host.Storage.GetStorageForDirectory(Path.Combine("cache", "fonts"));

            // base store is for user fonts
            Fonts = new FontStore(useAtlas: true, cacheStorage: cacheStorage);

            // nested store for framework provided fonts.
            // note that currently this means there could be two async font load operations.
            Fonts.AddStore(localFonts = new FontStore(useAtlas: false));

            localFonts.AddStore(new GlyphStore(Resources, @"Fonts/OpenSans/OpenSans"));
            localFonts.AddStore(new GlyphStore(Resources, @"Fonts/OpenSans/OpenSans-Bold"));
            localFonts.AddStore(new GlyphStore(Resources, @"Fonts/OpenSans/OpenSans-Italic"));
            localFonts.AddStore(new GlyphStore(Resources, @"Fonts/OpenSans/OpenSans-BoldItalic"));

            Fonts.AddStore(new GlyphStore(Resources, @"Fonts/FontAwesome5/FontAwesome-Solid"));
            Fonts.AddStore(new GlyphStore(Resources, @"Fonts/FontAwesome5/FontAwesome-Regular"));
            Fonts.AddStore(new GlyphStore(Resources, @"Fonts/FontAwesome5/FontAwesome-Brands"));

            dependencies.Cache(Fonts);

            Localisation = new LocalisationManager(config);
            dependencies.Cache(Localisation);
        }
Exemplo n.º 3
0
        private void load(FrameworkConfigManager config)
        {
            Resources = new ResourceStore <byte[]>();
            Resources.AddStore(new NamespacedResourceStore <byte[]>(new DllResourceStore(@"osu.Framework.dll"), @"Resources"));
            Resources.AddStore(new DllResourceStore(MainResourceFile));

            Textures = new TextureStore(new RawTextureLoaderStore(new NamespacedResourceStore <byte[]>(Resources, @"Textures")));
            Textures.AddStore(new RawTextureLoaderStore(new OnlineStore()));
            Dependencies.Cache(Textures);

            Audio = Dependencies.Cache(new AudioManager(
                                           new NamespacedResourceStore <byte[]>(Resources, @"Tracks"),
                                           new NamespacedResourceStore <byte[]>(Resources, @"Samples"))
            {
                EventScheduler = Scheduler
            });

            Host.RegisterThread(Audio.Thread);

            //attach our bindables to the audio subsystem.
            config.BindWith(FrameworkSetting.AudioDevice, Audio.AudioDevice);
            config.BindWith(FrameworkSetting.VolumeUniversal, Audio.Volume);
            config.BindWith(FrameworkSetting.VolumeEffect, Audio.VolumeSample);
            config.BindWith(FrameworkSetting.VolumeMusic, Audio.VolumeTrack);

            Shaders = new ShaderManager(new NamespacedResourceStore <byte[]>(Resources, @"Shaders"));
            Dependencies.Cache(Shaders);

            Fonts = new FontStore(new GlyphStore(Resources, @"Fonts/OpenSans"))
            {
                ScaleAdjust = 100
            };
            Dependencies.Cache(Fonts);
        }
        public LocalisationManager(FrameworkConfigManager config)
        {
            config.BindWith(FrameworkSetting.Locale, configLocale);
            configLocale.BindValueChanged(updateLocale);

            config.BindWith(FrameworkSetting.ShowUnicode, configPreferUnicode);
            configPreferUnicode.BindValueChanged(updateUnicodePreference, true);
        }
Exemplo n.º 5
0
        public override void SetupWindow(FrameworkConfigManager config)
        {
            config.BindWith(FrameworkSetting.WidthFullscreen, widthFullscreen);
            config.BindWith(FrameworkSetting.HeightFullscreen, heightFullscreen);

            config.BindWith(FrameworkSetting.Width, width);
            config.BindWith(FrameworkSetting.Height, height);

            config.BindWith(FrameworkSetting.WindowedPositionX, windowPositionX);
            config.BindWith(FrameworkSetting.WindowedPositionY, windowPositionY);

            config.BindWith(FrameworkSetting.ConfineMouseMode, ConfineMouseMode);

            config.BindWith(FrameworkSetting.MapAbsoluteInputToWindow, MapAbsoluteInputToWindow);

            ConfineMouseMode.ValueChanged += confineMouseMode_ValueChanged;
            ConfineMouseMode.TriggerChange();

            config.BindWith(FrameworkSetting.WindowMode, WindowMode);

            WindowMode.ValueChanged += windowMode_ValueChanged;
            WindowMode.TriggerChange();

            Exited += onExit;
        }
Exemplo n.º 6
0
        public override void SetupWindow(FrameworkConfigManager config)
        {
            config.BindWith(FrameworkSetting.SizeFullscreen, sizeFullscreen);

            sizeFullscreen.ValueChanged += newSize =>
            {
                if (WindowState == WindowState.Fullscreen)
                {
                    ChangeResolution(CurrentDisplay, newSize);
                }
            };

            config.BindWith(FrameworkSetting.WindowedSize, sizeWindowed);

            config.BindWith(FrameworkSetting.WindowedPositionX, windowPositionX);
            config.BindWith(FrameworkSetting.WindowedPositionY, windowPositionY);

            config.BindWith(FrameworkSetting.LastDisplayDevice, windowDisplayIndex);
            windowDisplayIndex.BindValueChanged(windowDisplayIndexChanged, true);

            config.BindWith(FrameworkSetting.WindowMode, WindowMode);
            WindowMode.BindValueChanged(windowModeChanged, true);

            config.BindWith(FrameworkSetting.ConfineMouseMode, ConfineMouseMode);
            ConfineMouseMode.BindValueChanged(confineMouseModeChanged, true);

            config.BindWith(FrameworkSetting.MapAbsoluteInputToWindow, MapAbsoluteInputToWindow);

            Exited += onExit;
        }
Exemplo n.º 7
0
        private void load(FrameworkConfigManager config, GameHost host)
        {
            window = (DesktopGameWindow)host.Window;
            config.BindWith(FrameworkSetting.SizeFullscreen, sizeFullscreen);
            config.BindWith(FrameworkSetting.WindowMode, windowMode);

            // so the test case doesn't change fullscreen size just when you enter it
            AddStep("nothing", () => { });

            // I'll assume that most monitors are compatible with 1280x720, and this is just for testing anyways
            testResolution(1280, 720);
            AddStep("change to fullscreen", () => windowMode.Value = WindowMode.Fullscreen);
            testResolution(1920, 1080);
            testResolution(1280, 960);
            AddStep("go back to windowed", () => windowMode.Value = WindowMode.Windowed);
        }
Exemplo n.º 8
0
        private void load(FrameworkConfigManager config, Storage storage)
        {
            Dropdown <FrameSync> frameSyncDropdown;

            AddRange(new Drawable[]
            {
                new Button
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Text             = "Open Arbor Folder",
                    Size             = new Vector2(100, 40),
                    Action           = storage.OpenInNativeExplorer,
                    BackgroundColour = Color4.Gray,
                },
                frameSyncDropdown = new BasicDropdown <FrameSync>
                {
                    Anchor   = Anchor.Centre,
                    Origin   = Anchor.BottomCentre,
                    Position = new Vector2(0, -100),
                    Width    = 80,
                    Items    = Enum.GetValues(typeof(FrameSync)).Cast <FrameSync>(),
                }
            });

            config.BindWith(FrameworkSetting.FrameSync, frameSyncDropdown.Current);
        }
Exemplo n.º 9
0
        private void load(FrameworkConfigManager config)
        {
            Resources = new ResourceStore <byte[]>();
            Resources.AddStore(new NamespacedResourceStore <byte[]>(new DllResourceStore(@"osu.Framework.dll"), @"Resources"));

            Textures = new TextureStore(Host.CreateTextureLoaderStore(new NamespacedResourceStore <byte[]>(Resources, @"Textures")));
            Textures.AddStore(Host.CreateTextureLoaderStore(new OnlineStore()));
            dependencies.Cache(Textures);

            var tracks = new ResourceStore <byte[]>(Resources);

            tracks.AddStore(new NamespacedResourceStore <byte[]>(Resources, @"Tracks"));
            tracks.AddStore(new OnlineStore());

            var samples = new ResourceStore <byte[]>(Resources);

            samples.AddStore(new NamespacedResourceStore <byte[]>(Resources, @"Samples"));
            samples.AddStore(new OnlineStore());

            Audio = new AudioManager(tracks, samples)
            {
                EventScheduler = Scheduler
            };
            dependencies.Cache(Audio);

            Host.RegisterThread(Audio.Thread);

            //attach our bindables to the audio subsystem.
            config.BindWith(FrameworkSetting.AudioDevice, Audio.AudioDevice);
            config.BindWith(FrameworkSetting.VolumeUniversal, Audio.Volume);
            config.BindWith(FrameworkSetting.VolumeEffect, Audio.VolumeSample);
            config.BindWith(FrameworkSetting.VolumeMusic, Audio.VolumeTrack);

            Shaders = new ShaderManager(new NamespacedResourceStore <byte[]>(Resources, @"Shaders"));
            dependencies.Cache(Shaders);

            Fonts = new FontStore(new GlyphStore(Resources, @"Fonts/OpenSans"));
            Fonts.AddStore(new GlyphStore(Resources, @"Fonts/OpenSans-Bold"));
            Fonts.AddStore(new GlyphStore(Resources, @"Fonts/OpenSans-Italic"));
            Fonts.AddStore(new GlyphStore(Resources, @"Fonts/OpenSans-BoldItalic"));
            dependencies.Cache(Fonts);

            Localisation = new LocalisationManager(config);
            dependencies.Cache(Localisation);
        }
Exemplo n.º 10
0
        public override void SetupWindow(FrameworkConfigManager config)
        {
            config.BindWith(FrameworkSetting.SizeFullscreen, sizeFullscreen);

            sizeFullscreen.ValueChanged += newSize =>
            {
                if (WindowState == WindowState.Fullscreen)
                {
                    ChangeResolution(GetCurrentDisplay(), newSize);
                }
            };

            config.BindWith(FrameworkSetting.WindowedSize, sizeWindowed);

            config.BindWith(FrameworkSetting.WindowedPositionX, windowPositionX);
            config.BindWith(FrameworkSetting.WindowedPositionY, windowPositionY);

            config.BindWith(FrameworkSetting.ConfineMouseMode, ConfineMouseMode);

            config.BindWith(FrameworkSetting.MapAbsoluteInputToWindow, MapAbsoluteInputToWindow);

            ConfineMouseMode.ValueChanged += confineMouseMode_ValueChanged;
            ConfineMouseMode.TriggerChange();

            config.BindWith(FrameworkSetting.WindowMode, WindowMode);

            WindowMode.ValueChanged += windowMode_ValueChanged;
            WindowMode.TriggerChange();

            Exited += onExit;
        }
Exemplo n.º 11
0
        private void load(AudioManager audio, FrameworkConfigManager config)
        {
            trackManager = new TrackManager(new OnlineStore());

            this.audio = audio;
            audio.AddItem(trackManager);

            config.BindWith(FrameworkSetting.VolumeMusic, trackManager.Volume);
        }
Exemplo n.º 12
0
            private void load(AudioManager audio, FrameworkConfigManager config)
            {
                // create a local trackManager to bypass the mute we are applying above.
                audio.AddItem(trackManager = new TrackManager(new OnlineStore()));

                // add back the user's music volume setting (since we are no longer in the global TrackManager's hierarchy).
                config.BindWith(FrameworkSetting.VolumeMusic, trackManager.Volume);

                Preview = trackManager.Get(preview);
            }
Exemplo n.º 13
0
        public override void SetupWindow(FrameworkConfigManager config)
        {
            base.SetupWindow(config);

            sizeWindowed.ValueChanged += evt =>
            {
                if (!evt.NewValue.IsEmpty && WindowState.Value == Platform.WindowState.Normal)
                {
                    Size.Value = evt.NewValue;
                }
            };

            config.BindWith(FrameworkSetting.WindowedSize, sizeWindowed);

            config.BindWith(FrameworkSetting.ConfineMouseMode, ConfineMouseMode);
            ConfineMouseMode.BindValueChanged(confineMouseModeChanged, true);

            Resized += onResized;
        }
Exemplo n.º 14
0
        public override void SetupWindow(FrameworkConfigManager config)
        {
            base.SetupWindow(config);

            CurrentDisplay.ValueChanged += evt =>
            {
                windowDisplayIndex.Value = (DisplayIndex)evt.NewValue.Index;
                windowPositionX.Value    = 0.5;
                windowPositionY.Value    = 0.5;
            };

            config.BindWith(FrameworkSetting.LastDisplayDevice, windowDisplayIndex);
            windowDisplayIndex.BindValueChanged(evt => CurrentDisplay.Value = Displays.ElementAtOrDefault((int)evt.NewValue) ?? PrimaryDisplay, true);

            sizeFullscreen.ValueChanged += evt =>
            {
                if (evt.NewValue.IsEmpty || CurrentDisplay.Value == null)
                {
                    return;
                }

                var mode = CurrentDisplay.Value.FindDisplayMode(evt.NewValue);
                if (mode.Size != System.Drawing.Size.Empty)
                {
                    WindowBackend.CurrentDisplayMode = mode;
                }
            };

            sizeWindowed.ValueChanged += evt =>
            {
                if (evt.NewValue.IsEmpty)
                {
                    return;
                }

                WindowBackend.Size = evt.NewValue;
                Size.Value         = evt.NewValue;
            };

            config.BindWith(FrameworkSetting.SizeFullscreen, sizeFullscreen);
            config.BindWith(FrameworkSetting.WindowedSize, sizeWindowed);

            config.BindWith(FrameworkSetting.WindowedPositionX, windowPositionX);
            config.BindWith(FrameworkSetting.WindowedPositionY, windowPositionY);

            RelativePosition = new Vector2((float)windowPositionX.Value, (float)windowPositionY.Value);

            config.BindWith(FrameworkSetting.WindowMode, WindowMode);
            WindowMode.BindValueChanged(evt => UpdateWindowMode(evt.NewValue), true);

            config.BindWith(FrameworkSetting.ConfineMouseMode, ConfineMouseMode);
            ConfineMouseMode.BindValueChanged(confineMouseModeChanged, true);

            Resized += onResized;
            Moved   += onMoved;
        }
Exemplo n.º 15
0
        private void load(FrameworkConfigManager config, GameHost host)
        {
            window = host.Window;
            config.BindWith(FrameworkSetting.SizeFullscreen, sizeFullscreen);
            config.BindWith(FrameworkSetting.WindowMode, windowMode);
            currentWindowMode.Text = $"Window Mode: {windowMode}";

            // so the test case doesn't change fullscreen size just when you enter it
            AddStep("nothing", () => { });

            // I'll assume that most monitors are compatible with 1280x720, and this is just for testing anyways
            testResolution(1280, 720);
            AddStep("change to fullscreen", () => windowMode.Value = WindowMode.Fullscreen);
            testResolution(1920, 1080);
            testResolution(1280, 960);
            testResolution(9999, 9999);
            AddStep("go back to windowed", () => windowMode.Value = WindowMode.Windowed);

            AddStep("change window size", () => config.GetBindable <Size>(FrameworkSetting.WindowedSize).Value = new Size(640, 640));

            AddStep("change to borderless", () => windowMode.Value = WindowMode.Borderless);
        }
Exemplo n.º 16
0
        private void load(AudioManager audio, FrameworkConfigManager config)
        {
            // this is a temporary solution to get around muting ourselves.
            // todo: update this once we have a BackgroundTrackManager or similar.
            trackStore = new PreviewTrackStore(new OnlineStore());

            audio.AddItem(trackStore);
            trackStore.AddAdjustment(AdjustableProperty.Volume, audio.VolumeTrack);

            this.audio = audio;

            config.BindWith(FrameworkSetting.VolumeMusic, trackStore.Volume);
        }
Exemplo n.º 17
0
        private void load(FrameworkConfigManager config, GameHost host)
        {
            window = host.Window as DesktopGameWindow;
            config.BindWith(FrameworkSetting.WindowMode, windowMode);

            if (window == null)
            {
                Console.WriteLine("No suitable window found");
                return;
            }

            refreshScreens();
            AddStep("set up screens", refreshScreens);

            const string desc1 = "Check whether the borderless window is properly set to the top left corner, even if it is obstructed by the taskbar";
            const string desc2 = "Check whether the window size is one pixel wider than the screen in each direction";

            for (int i = 0;; i++)
            {
                var display = DisplayDevice.GetDisplay((DisplayIndex)i);
                if (display == null)
                {
                    break;
                }

                // set up window
                AddStep("switch to windowed", () => windowMode.Value           = WindowMode.Windowed);
                AddStep("set client size to 1280x720", () => window.ClientSize = new Size(1280, 720));
                AddStep("center window on screen " + i, () => window.CentreToScreen(display));

                // borderless alignment tests
                AddStep("switch to borderless", () => windowMode.Value = WindowMode.Borderless);
                AddAssert("check window location", () => window.Location == display.Bounds.Location, desc1);
                AddAssert("check window size", () => new Size(window.Width - 1, window.Height - 1) == display.Bounds.Size, desc2);
                AddAssert("check current screen", () => window.CurrentDisplay == display);

                // verify the window size is restored correctly
                AddStep("switch to windowed", () => windowMode.Value = WindowMode.Windowed);
                AddAssert("check client size", () => window.ClientSize == new Size(1280, 720));
                AddAssert("check window position", () => Math.Abs(window.Position.X - 0.5f) < 0.01 && Math.Abs(window.Position.Y - 0.5f) < 0.01);
                AddAssert("check current screen", () => window.CurrentDisplay == display);
            }
        }
        private void load(FrameworkConfigManager config, GameHost host)
        {
            window = host.Window as SDL2DesktopWindow;
            config.BindWith(FrameworkSetting.WindowMode, windowMode);

            if (window == null)
            {
                Logger.Log("No suitable window found");
                return;
            }

            refreshScreens();

            AddStep("set up screens", refreshScreens);

            const string desc2 = "Check whether the window size is one pixel wider than the screen in each direction";

            Point originalWindowPosition = Point.Empty;

            foreach (var display in window.Displays)
            {
                AddLabel($"Steps for display {display.Index}");

                // set up window
                AddStep("switch to windowed", () => windowMode.Value = WindowMode.Windowed);
                AddStep($"move window to display {display.Index}", () => window.CurrentDisplayBindable.Value = window.Displays.ElementAt(display.Index));
                AddStep("set client size to 1280x720", () => config.SetValue(FrameworkSetting.WindowedSize, new Size(1280, 720)));
                AddStep("store window position", () => originalWindowPosition = window.Position);

                // borderless alignment tests
                AddStep("switch to borderless", () => windowMode.Value = WindowMode.Borderless);
                AddAssert("check window position", () => new Point(window.Position.X, window.Position.Y) == display.Bounds.Location);
                AddAssert("check window size", () => new Size(window.Size.Width, window.Size.Height) == display.Bounds.Size, desc2);
                AddAssert("check current screen", () => window.CurrentDisplayBindable.Value.Index == display.Index);

                // verify the window size is restored correctly
                AddStep("switch to windowed", () => windowMode.Value = WindowMode.Windowed);
                AddAssert("check client size", () => window.ClientSize == new Size(1280, 720));
                AddAssert("check window position", () => originalWindowPosition == window.Position);
                AddAssert("check current screen", () => window.CurrentDisplayBindable.Value.Index == display.Index);
            }
        }
Exemplo n.º 19
0
        public override void SetupWindow(FrameworkConfigManager config)
        {
            config.BindWith(FrameworkConfig.WidthFullscreen, widthFullscreen);
            config.BindWith(FrameworkConfig.HeightFullscreen, heightFullscreen);

            config.BindWith(FrameworkConfig.Width, width);
            config.BindWith(FrameworkConfig.Height, height);

            config.BindWith(FrameworkConfig.WindowedPositionX, windowPositionX);
            config.BindWith(FrameworkConfig.WindowedPositionY, windowPositionY);

            config.BindWith(FrameworkConfig.WindowMode, mode);

            mode.ValueChanged += mode_ValueChanged;
            mode.TriggerChange();

            Exited += onExit;
        }
Exemplo n.º 20
0
        private void load(FrameworkConfigManager config)
        {
            Resources = new ResourceStore <byte[]>();
            Resources.AddStore(new NamespacedResourceStore <byte[]>(new DllResourceStore(typeof(Game).Assembly), @"Resources"));

            Textures = new TextureStore(Host.CreateTextureLoaderStore(new NamespacedResourceStore <byte[]>(Resources, @"Textures")));
            Textures.AddStore(Host.CreateTextureLoaderStore(new OnlineStore()));
            dependencies.Cache(Textures);

            var tracks = new ResourceStore <byte[]>();

            tracks.AddStore(new NamespacedResourceStore <byte[]>(Resources, @"Tracks"));
            tracks.AddStore(new OnlineStore());

            var samples = new ResourceStore <byte[]>();

            samples.AddStore(new NamespacedResourceStore <byte[]>(Resources, @"Samples"));
            samples.AddStore(new OnlineStore());

            Audio = new AudioManager(Host.AudioThread, tracks, samples)
            {
                EventScheduler = Scheduler
            };
            dependencies.Cache(Audio);

            dependencies.CacheAs(Audio.Tracks);
            dependencies.CacheAs(Audio.Samples);

            // attach our bindables to the audio subsystem.
            config.BindWith(FrameworkSetting.AudioDevice, Audio.AudioDevice);
            config.BindWith(FrameworkSetting.VolumeUniversal, Audio.Volume);
            config.BindWith(FrameworkSetting.VolumeEffect, Audio.VolumeSample);
            config.BindWith(FrameworkSetting.VolumeMusic, Audio.VolumeTrack);

            Shaders = new ShaderManager(new NamespacedResourceStore <byte[]>(Resources, @"Shaders"));
            dependencies.Cache(Shaders);

            var cacheStorage = Host.Storage.GetStorageForDirectory(Path.Combine("cache", "fonts"));

            // base store is for user fonts
            Fonts = new FontStore(useAtlas: true, cacheStorage: cacheStorage);

            // nested store for framework provided fonts.
            // note that currently this means there could be two async font load operations.
            Fonts.AddStore(localFonts = new FontStore(useAtlas: false));

            addFont(localFonts, Resources, @"Fonts/OpenSans/OpenSans");
            addFont(localFonts, Resources, @"Fonts/OpenSans/OpenSans-Bold");
            addFont(localFonts, Resources, @"Fonts/OpenSans/OpenSans-Italic");
            addFont(localFonts, Resources, @"Fonts/OpenSans/OpenSans-BoldItalic");

            addFont(Fonts, Resources, @"Fonts/FontAwesome5/FontAwesome-Solid");
            addFont(Fonts, Resources, @"Fonts/FontAwesome5/FontAwesome-Regular");
            addFont(Fonts, Resources, @"Fonts/FontAwesome5/FontAwesome-Brands");

            dependencies.Cache(Fonts);

            Localisation = new LocalisationManager(config);
            dependencies.Cache(Localisation);

            logOverlayVisibility = config.GetBindable <bool>(FrameworkSetting.ShowLogOverlay);
            logOverlayVisibility.BindValueChanged(visibility =>
            {
                if (visibility.NewValue)
                {
                    if (logOverlay == null)
                    {
                        LoadComponentAsync(logOverlay = new LogOverlay
                        {
                            Depth = float.MinValue / 2,
                        }, AddInternal);
                    }

                    logOverlay.Show();
                }
                else
                {
                    logOverlay?.Hide();
                }
            }, true);
        }