Example #1
0
        public void TestHiddenHUDDoesntBlockSkinnableComponentsLoad()
        {
            AddStep("set hud to never show", () => localConfig.SetValue(OsuSetting.HUDVisibilityMode, HUDVisibilityMode.Never));

            createNew();

            AddUntilStep("wait for hud load", () => hudOverlay.IsLoaded);
            AddUntilStep("wait for components to be hidden", () => !hudOverlay.ChildrenOfType <SkinnableTargetContainer>().Single().IsPresent);

            AddStep("reload components", () => hudOverlay.ChildrenOfType <SkinnableTargetContainer>().Single().Reload());
            AddUntilStep("skinnable components loaded", () => hudOverlay.ChildrenOfType <SkinnableTargetContainer>().Single().ComponentsLoaded);
        }
Example #2
0
        public void TestHiddenHUDDoesntBlockComponentUpdates()
        {
            int updateCount = 0;

            AddStep("set hud to never show", () => localConfig.SetValue(OsuSetting.HUDVisibilityMode, HUDVisibilityMode.Never));

            createNew();

            AddUntilStep("wait for hud load", () => hudOverlay.IsLoaded);
            AddUntilStep("wait for components to be hidden", () => hudOverlay.ChildrenOfType <SkinnableTargetContainer>().Single().Alpha == 0);

            AddStep("bind on update", () =>
            {
                hudOverlay.ChildrenOfType <BarHitErrorMeter>().First().OnUpdate += _ => updateCount++;
            });

            AddUntilStep("wait for updates", () => updateCount > 0);
        }
Example #3
0
        public void TestHiddenHUDDoesntBlockSkinnableComponentsLoad()
        {
            HUDVisibilityMode originalConfigValue = default;

            AddStep("get original config value", () => originalConfigValue = config.Get <HUDVisibilityMode>(OsuSetting.HUDVisibilityMode));

            AddStep("set hud to never show", () => config.SetValue(OsuSetting.HUDVisibilityMode, HUDVisibilityMode.Never));

            createNew();
            AddUntilStep("wait for hud load", () => hudOverlay.IsLoaded);
            AddUntilStep("skinnable components loaded", () => hudOverlay.ChildrenOfType <SkinnableTargetContainer>().Single().ComponentsLoaded);

            AddStep("set original config value", () => config.SetValue(OsuSetting.HUDVisibilityMode, originalConfigValue));
        }