Exemple #1
0
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            base.OnRenderFrame(e);
            GL.Clear(ClearBufferMask.ColorBufferBit);

            var xx = sw.ElapsedTicks;

            switch (Config.screen)
            {
            case Screen.Stage:
                Stage.Draw(Audio.MusicTime);
                Judgement.Draw(Audio.MusicTime);
                break;

            case Screen.SongSelection:
                if (Stage.beatmap != null)
                {
                    Stage.Draw(Audio.MusicTime);
                }
                SongSelection.Draw();
                break;
            }
            var yy = sw.ElapsedTicks;

            SwapBuffers();
            var zz = sw.ElapsedTicks;

            frameTime     = e.Time * 1000;
            drawTime      = (yy - xx) * 1000 / (double)Stopwatch.Frequency;
            times[tIndex] = frameTime;
            if (++tIndex == 1024)
            {
                tIndex = 0;
            }
        }
Exemple #2
0
        protected override void OnKeyDown(KeyboardKeyEventArgs e)
        {
            base.OnKeyDown(e);
            if (Config.screen == Screen.Stage)
            {
                Stage.OnKey(e, true, Audio.MusicTime);
            }
            else
            {
                SongSelection.OnKeyDown(e);
            }
            if (e.IsRepeat)
            {
                return;
            }
            switch (e.Key)
            {
            case Key.F11:
                WindowState = WindowState == WindowState.Fullscreen ? WindowState.Normal : WindowState.Fullscreen;
                break;

            default:
                break;
            }
        }
Exemple #3
0
 protected override void OnKeyPress(KeyPressEventArgs e)
 {
     base.OnKeyPress(e);
     if (Config.screen == Screen.SongSelection)
     {
         SongSelection.OnKeyPress(e);
     }
 }