private void Load() { Audio.Frequency.Set(1); Audio.Volume.Set(.05); _stack = new ScreenStack(false); Add(_stack); Window.Title = $"Qsor - {Version}"; AddInternal(KeyBindingInputHandler = new GlobalKeyBindingInputHandler(this)); if (!DebugUtils.IsDebugBuild) { _stack.Anchor = Anchor.Centre; _stack.Origin = Anchor.Centre; _stack.Push(new IntroScreen()); Scheduler.AddDelayed(() => { _stack.Exit(); Scheduler.AddDelayed(() => _stack.Push(new MainMenuScreen()), 2000); }, 6000); } else { _stack.Push(new MainMenuScreen()); } }
protected void LoadScreen(OsuScreen screen) { if (stack.CurrentScreen != null) { stack.Exit(); } stack.Push(screen); }
public override bool OnBackButton() { if ((screenStack.CurrentScreen as IOnlinePlaySubScreen)?.OnBackButton() == true) { return(true); } if (screenStack.CurrentScreen != null && !(screenStack.CurrentScreen is LoungeSubScreen)) { screenStack.Exit(); return(true); } return(false); }
private void Load() { var stack = new ScreenStack(); Add(stack); AddStep("Start sequence", () => { stack.Push(new IntroScreen()); }); AddStep("Exit sequence", () => { stack.Exit(); }); }
public override bool OnBackButton() { if (!(screenStack.CurrentScreen is IOnlinePlaySubScreen onlineSubScreen)) { return(false); } if (((Drawable)onlineSubScreen).IsLoaded && onlineSubScreen.AllowBackButton && onlineSubScreen.OnBackButton()) { return(true); } if (screenStack.CurrentScreen != null && !(screenStack.CurrentScreen is LoungeSubScreen)) { screenStack.Exit(); return(true); } return(false); }
public void ExitScreen() { _stack.Exit(); }