public override void Reset() { base.Reset(); Children = new[] { settings = new SettingsOverlay() }; settings.ToggleVisibility(); }
public TestSceneSettings() { SettingsOverlay settings; Add(settings = new SettingsOverlay()); AddStep("toggle", () => settings.ToggleVisibility()); }
private void load(DirectOverlay direct, SettingsOverlay settings) { if (host.CanExit) { AddInternal(new ExitConfirmOverlay { Action = this.Exit }); } AddRangeInternal(new Drawable[] { new ParallaxContainer { ParallaxAmount = 0.01f, Children = new Drawable[] { buttons = new ButtonSystem { OnChart = delegate { this.Push(new ChartListing()); }, OnDirect = delegate { this.Push(new OnlineListing()); }, OnEdit = delegate { this.Push(new Editor()); }, OnSolo = onSolo, OnMulti = delegate { this.Push(new Multiplayer()); }, OnExit = this.Exit, } } }, sideFlashes = new MenuSideFlashes(), }); buttons.StateChanged += state => { switch (state) { case ButtonSystemState.Initial: case ButtonSystemState.Exit: Background.FadeColour(Color4.White, 500, Easing.OutSine); break; default: Background.FadeColour(OsuColour.Gray(0.8f), 500, Easing.OutSine); break; } }; buttons.OnSettings = () => settings?.ToggleVisibility(); buttons.OnDirect = () => direct?.ToggleVisibility(); LoadComponentAsync(background = new BackgroundScreenDefault()); preloadSongSelect(); }
public bool OnPressed(HoloTrackAction action) { switch (action) { case HoloTrackAction.ToggleSettings: settings.ToggleVisibility(); return(true); case HoloTrackAction.ToggleCamera: sidePanel.ToggleVisibility(); return(true); default: return(false); } }
public void ToggleSettings() => settings.ToggleVisibility();
protected override void LoadComplete() { base.LoadComplete(); settings.ToggleVisibility(); }
private void load(BeatmapListingOverlay beatmapListing, SettingsOverlay settings, RankingsOverlay rankings, OsuConfigManager config, SessionStatics statics) { holdDelay = config.GetBindable <float>(OsuSetting.UIHoldActivationDelay); loginDisplayed = statics.GetBindable <bool>(Static.LoginOverlayDisplayed); if (host.CanExit) { AddInternal(exitConfirmOverlay = new ExitConfirmOverlay { Action = () => { if (holdDelay.Value > 0) { confirmAndExit(); } else { this.Exit(); } } }); } AddRangeInternal(new[] { buttonsContainer = new ParallaxContainer { ParallaxAmount = 0.01f, Children = new Drawable[] { buttons = new ButtonSystem { OnEdit = delegate { this.Push(new Editor()); }, OnSolo = onSolo, OnMulti = delegate { this.Push(new Multiplayer()); }, OnExit = confirmAndExit, } } }, sideFlashes = new MenuSideFlashes(), songTicker = new SongTicker { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Margin = new MarginPadding { Right = 15, Top = 5 } }, exitConfirmOverlay?.CreateProxy() ?? Drawable.Empty() }); buttons.StateChanged += state => { switch (state) { case ButtonSystemState.Initial: case ButtonSystemState.Exit: Background.FadeColour(Color4.White, 500, Easing.OutSine); break; default: Background.FadeColour(OsuColour.Gray(0.8f), 500, Easing.OutSine); break; } }; buttons.OnSettings = () => settings?.ToggleVisibility(); buttons.OnBeatmapListing = () => beatmapListing?.ToggleVisibility(); buttons.OnChart = () => rankings?.ShowSpotlights(); LoadComponentAsync(background = new BackgroundScreenDefault()); preloadSongSelect(); }
private void load(DirectOverlay direct, SettingsOverlay settings, OsuConfigManager config, SessionStatics statics) { holdDelay = config.GetBindable <float>(OsuSetting.UIHoldActivationDelay); loginDisplayed = statics.GetBindable <bool>(Static.LoginOverlayDisplayed); if (host.CanExit) { AddInternal(exitConfirmOverlay = new ExitConfirmOverlay { Action = () => { if (holdDelay.Value > 0) { confirmAndExit(); } else { this.Exit(); } } }); } AddRangeInternal(new Drawable[] { new ParallaxContainer { ParallaxAmount = 0.01f, Children = new Drawable[] { buttons = new ButtonSystem { OnChart = delegate { this.Push(new ChartListing()); }, OnEdit = delegate { this.Push(new Editor()); }, OnSolo = onSolo, OnMulti = delegate { this.Push(new Multiplayer()); }, OnExit = confirmAndExit, } } }, sideFlashes = new MenuSideFlashes(), }); buttons.StateChanged += state => { switch (state) { case ButtonSystemState.Initial: case ButtonSystemState.Exit: Background.FadeColour(Color4.White, 500, Easing.OutSine); break; default: Background.FadeColour(OsuColour.Gray(0.8f), 500, Easing.OutSine); break; } }; buttons.OnSettings = () => settings?.ToggleVisibility(); buttons.OnDirect = () => direct?.ToggleVisibility(); LoadComponentAsync(background = new BackgroundScreenDefault()); preloadSongSelect(); }