public void TestSetMultipleContainers() { bool failed = false; LogoTrackingContainer newContainer = new LogoTrackingContainer(); AddStep("Set up scenario", () => { failed = false; newContainer = new LogoTrackingContainer(); addFacadeContainers(); moveLogoFacade(); }); AddStep("Try tracking new container", () => { try { newContainer.StartTracking(logo); } catch (Exception e) { if (e is InvalidOperationException) { failed = true; } } }); AddAssert("Exception thrown", () => failed); }
private void load(SessionStatics sessionStatics) { muteWarningShownOnce = sessionStatics.GetBindable <bool>(Static.MutedAudioNotificationShownOnce); InternalChild = (content = new LogoTrackingContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, }).WithChildren(new Drawable[] { MetadataInfo = new BeatmapMetadataDisplay(Beatmap.Value, Mods, content.LogoFacade) { Alpha = 0, Anchor = Anchor.Centre, Origin = Anchor.Centre, }, new FillFlowContainer <PlayerSettingsGroup> { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding(25), Children = new PlayerSettingsGroup[] { VisualSettings = new VisualSettings(), new InputSettings() } }, idleTracker = new IdleTracker(750) }); }
private void load() { InternalChild = (content = new LogoTrackingContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, }).WithChildren(new Drawable[] { info = new BeatmapMetadataDisplay(Beatmap.Value, Mods.Value, content.LogoFacade) { Alpha = 0, Anchor = Anchor.Centre, Origin = Anchor.Centre, }, new FillFlowContainer <PlayerSettingsGroup> { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding(25), Children = new PlayerSettingsGroup[] { VisualSettings = new VisualSettings(), new InputSettings() } } }); loadNewPlayer(); }
private void load(SessionStatics sessionStatics, AudioManager audio) { muteWarningShownOnce = sessionStatics.GetBindable <bool>(Static.MutedAudioNotificationShownOnce); batteryWarningShownOnce = sessionStatics.GetBindable <bool>(Static.LowBatteryNotificationShownOnce); InternalChildren = new Drawable[] { (content = new LogoTrackingContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, }).WithChildren(new Drawable[] { MetadataInfo = new BeatmapMetadataDisplay(Beatmap.Value, Mods, content.LogoFacade) { Alpha = 0, Anchor = Anchor.Centre, Origin = Anchor.Centre, }, PlayerSettings = new FillFlowContainer <PlayerSettingsGroup> { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding(25), Children = new PlayerSettingsGroup[] { VisualSettings = new VisualSettings(), new InputSettings() } }, idleTracker = new IdleTracker(750), }), lowPassFilter = new AudioFilter(audio.TrackMixer), highPassFilter = new AudioFilter(audio.TrackMixer, BQFType.HighPass) }; if (Beatmap.Value.BeatmapInfo.EpilepsyWarning) { AddInternal(epilepsyWarning = new EpilepsyWarning { Anchor = Anchor.Centre, Origin = Anchor.Centre, }); } }
public ButtonSystem() { RelativeSizeAxes = Axes.Both; Child = logoTrackingContainer = new LogoTrackingContainer { RelativeSizeAxes = Axes.Both, Child = buttonArea = new ButtonArea() }; buttonArea.AddRange(new Drawable[] { new Button(ButtonSystemStrings.Settings, string.Empty, FontAwesome.Solid.Cog, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O), backButton = new Button(ButtonSystemStrings.Back, @"button-back-select", OsuIcon.LeftCircle, new Color4(51, 58, 94, 255), () => State = ButtonSystemState.TopLevel, -WEDGE_WIDTH) { VisibleState = ButtonSystemState.Play, }, logoTrackingContainer.LogoFacade.With(d => d.Scale = new Vector2(0.74f)) }); buttonArea.Flow.CentreTarget = logoTrackingContainer.LogoFacade; }