Esempio n. 1
0
        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());
            }
        }
Esempio n. 2
0
 protected void LoadScreen(OsuScreen screen)
 {
     if (stack.CurrentScreen != null)
     {
         stack.Exit();
     }
     stack.Push(screen);
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        private void Load()
        {
            var stack = new ScreenStack();

            Add(stack);

            AddStep("Start sequence", () =>
            {
                stack.Push(new IntroScreen());
            });

            AddStep("Exit sequence", () =>
            {
                stack.Exit();
            });
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
 public void ExitScreen()
 {
     _stack.Exit();
 }