コード例 #1
0
        public override void Initialize()
        {
            MatchSetup.Match = null;

            StreamingManager.StopSpectating(false);

            text_noMatchFound = LocalisationManager.GetString(OsuString.Lobby_NoMatch);
            text_loading      = LocalisationManager.GetString(OsuString.General_Loading);

            spriteManager = new SpriteManager(true);

            spriteManagerFilters = new SpriteManager(true);
            //spriteManagerFilters.Alpha = 0;
            spriteManagerFilters.SetVisibleArea(new RectangleF(0, content_y - filters_height, 640, filters_height));

            BanchoClient.OnConnect      += BanchoClient_OnConnect;
            KeyboardHandler.OnKeyRepeat += KeyboardHandler_OnKeyRepeat;

            pText headerText =
                new pText(LocalisationManager.GetString(OsuString.Lobby_Header), 24, new Vector2(0, 0), 0.955F, true, new Color(255, 255, 255, 255));

            spriteManager.Add(headerText);

            headerText2 = new pText(text_loading, 12, new Vector2(170, 8), 0.955F, true,
                                    new Color(255, 255, 255, 255));
            spriteManager.Add(headerText2);


            //pSprite bgf =
            //    new pSprite(TextureManager.Load(@"lobby-background"), Fields.TopLeft, Origins.TopLeft,
            //                Clocks.Instance, Vector2.Zero, 0, true, Color.White);
            //spriteManager.Add(bgf);

            pSprite p = new pSprite(GameBase.WhitePixel, Fields.TopLeft, Origins.TopLeft, Clocks.Game, new Vector2(0, content_y - filters_height), 0.1f, true, new Color(0, 0, 0, 180));

            p.Scale       = 1.6f;
            p.VectorScale = new Vector2(GameBase.WindowManager.WidthScaled, content_height + filters_height + 30);
            spriteManager.Add(p);

            int button_height = content_y + content_height + 2;

            pButton pbut = new pButton(LocalisationManager.GetString(OsuString.Lobby_NewGame), new Vector2(GameBase.WindowManager.WidthScaled / 2 - 100, button_height), new Vector2(200, 25), 0.92f, new Color(99, 139, 228), OnCreateGame);

            spriteManager.Add(pbut.SpriteCollection);

            pbut = new pButton(LocalisationManager.GetString(OsuString.Lobby_QuickJoin), new Vector2(GameBase.WindowManager.WidthScaled / 2 + 110, button_height), new Vector2(200, 25), 0.92f, Color.YellowGreen, OnQuickJoin);
            spriteManager.Add(pbut.SpriteCollection);

            pbut = new pButton(LocalisationManager.GetString(OsuString.Lobby_BackToMenu), new Vector2(GameBase.WindowManager.WidthScaled / 2 - 310, button_height), new Vector2(200, 25), 0.92f, new Color(235, 160, 62), back_OnClick);
            spriteManager.Add(pbut.SpriteCollection);

            noMatches               = new pText(text_loading, 18, new Vector2(GameBase.WindowManager.WidthScaled / 2, 180), new Vector2(400, 0), 1, true, Color.White, false);
            noMatches.TextBold      = true;
            noMatches.Alpha         = 0;
            noMatches.TextAlignment = TextAlignment.Centre;
            noMatches.Origin        = Origins.Centre;
            spriteManager.Add(noMatches);

            sortingTabs = new pTabCollection(spriteManager, 6, new Vector2(50, 40), 0.98f, false,
                                             Color.Crimson);
            sortingTabs.Add(LocalisationManager.GetString(OsuString.Lobby_All), -1);
            sortingTabs.Add(OsuCommon.PlayModeString(PlayModes.Osu), (int)PlayModes.Osu);
            sortingTabs.Add(OsuCommon.PlayModeString(PlayModes.Taiko), (int)PlayModes.Taiko);
            sortingTabs.Add(OsuCommon.PlayModeString(PlayModes.CatchTheBeat), (int)PlayModes.CatchTheBeat);
            sortingTabs.Add(OsuCommon.PlayModeString(PlayModes.OsuMania), (int)PlayModes.OsuMania);
            sortingTabs.SetSelected(ConfigManager.sLobbyPlayMode.Value, true);
            sortingTabs.OnTabChanged += delegate { ConfigManager.sLobbyPlayMode.Value = (int)sortingTabs.SelectedTab.Tag; LobbyUpdatePending = true; };

            checkExistingMaps = new pCheckbox(LocalisationManager.GetString(OsuString.Lobby_ExistMapOnly), 0.8f, new Vector2(5, 2), 1, ConfigManager.sLobbyShowExistingOnly);
            spriteManagerFilters.Add(checkExistingMaps.SpriteCollection);

            checkExistingMaps.OnCheckChanged +=
                delegate(object sender, bool status)
            {
                ConfigManager.sLobbyShowExistingOnly.Value = status;
                LobbyUpdatePending = true;
            };

            checkFriendsOnly = new pCheckbox(LocalisationManager.GetString(OsuString.Lobby_FriendOnly), 0.8f, new Vector2(5, 19), 1, ConfigManager.sLobbyShowFriendsOnly);
            spriteManagerFilters.Add(checkFriendsOnly.SpriteCollection);

            checkFriendsOnly.OnCheckChanged +=
                delegate(object sender, bool status)
            {
                ConfigManager.sLobbyShowFriendsOnly.Value = status;
                LobbyUpdatePending = true;
            };

            checkInProgress = new pCheckbox(LocalisationManager.GetString(OsuString.Lobby_InProgress), 0.8f, new Vector2(360, 19), 1, ConfigManager.sLobbyShowInProgress);
            spriteManagerFilters.Add(checkInProgress.SpriteCollection);

            checkInProgress.OnCheckChanged +=
                delegate(object sender, bool status)
            {
                ConfigManager.sLobbyShowInProgress.Value = status;
                LobbyUpdatePending = true;
            };

            checkShowFullGames = new pCheckbox(LocalisationManager.GetString(OsuString.Lobby_ShowFull), 0.8f, new Vector2(180, 2), 1, ConfigManager.sLobbyShowFull);
            spriteManagerFilters.Add(checkShowFullGames.SpriteCollection);

            checkShowFullGames.OnCheckChanged += delegate(object sender, bool status)
            {
                ConfigManager.sLobbyShowFull.Value = status;
                LobbyUpdatePending = true;
            };

            checkShowPasswordedGames = new pCheckbox(LocalisationManager.GetString(OsuString.Lobby_ShowLocked), 0.8f, new Vector2(180, 19), 1, ConfigManager.sLobbyShowPassworded);
            spriteManagerFilters.Add(checkShowPasswordedGames.SpriteCollection);

            checkShowPasswordedGames.OnCheckChanged +=
                delegate(object sender, bool status)
            {
                ConfigManager.sLobbyShowPassworded.Value = status;
                LobbyUpdatePending = true;
            };

            pText pt = new pText(LocalisationManager.GetString(OsuString.Lobby_Search), 14, new Vector2(360, 2), 1, true, Color.White);

            spriteManagerFilters.Add(pt);

            filterTextBox             = new pTextBox(string.Empty, 14, new Vector2(360 + pt.MeasureText().X, 2), 134, 1);
            filterTextBox.LengthLimit = 20;
            filterTextBox.OnChange   += delegate
            {
                LobbyUpdatePending = true;

                if (filterTextBox.Text.Length > 0)
                {
                    checkFriendsOnly.Hide();
                    checkShowFullGames.Hide();
                    checkShowPasswordedGames.Hide();
                    checkExistingMaps.Hide();
                    sortingTabs.SetSelected(-1, true);
                }
                else
                {
                    checkFriendsOnly.Show();
                    checkShowFullGames.Show();
                    checkShowPasswordedGames.Show();
                    checkExistingMaps.Show();
                    sortingTabs.SetSelected(ConfigManager.sLobbyPlayMode.Value, true);
                }
            };
            spriteManagerFilters.Add(filterTextBox.SpriteCollection);

            //buttonFilters = new pButton(LocalisationManager.GetString(OsuString.Lobby_Filters), new Vector2(390, 32), new Vector2(100, 20), 1, Color.YellowGreen, toggleFilters);
            //spriteManager.Add(buttonFilters.SpriteCollection);

            base.Initialize();

            if (BeatmapManager.Current == null || string.IsNullOrEmpty(BeatmapManager.Current.ContainingFolder) || !BeatmapManager.Current.BeatmapPresent)
            {
                MusicControl.ChooseRandomSong(true);
            }

            JoinLobby();

            LobbyUpdatePending = true;
        }
コード例 #2
0
        public override void Initialize()
        {
            base.Initialize();

            Player.ScoreBoard.spriteManager.WidescreenAutoOffset = true;
            Player.ScoreBoard.spriteManager.Alpha = 1;

            lock (StreamingManager.LockReplayScore)
            {
                InputManager.ReplayMode      = false;
                InputManager.ReplayStreaming = false;
                InputManager.ReplayStartTime = 0;
            }

            pText     text   = null;
            SlotTeams winner = PlayerVs.TeamOverlay.winner;

            if (PlayerVs.TeamFailed(SlotTeams.Blue))
            {
                text = new pText("Blue team failed!", 20, new Vector2(GameBase.WindowManager.WidthScaled / 2, 85), Vector2.Zero, 1, true, Color.Blue, false);
            }
            else if (PlayerVs.TeamFailed(SlotTeams.Red))
            {
                text = new pText("Red team failed!", 20, new Vector2(GameBase.WindowManager.WidthScaled / 2, 85), Vector2.Zero, 1, true, Color.Red, false);
            }
            else
            {
                switch (winner)
                {
                case SlotTeams.Blue:
                    text = new pText("Blue team wins!", 20, new Vector2(GameBase.WindowManager.WidthScaled / 2, 85), Vector2.Zero, 1, true, Color.Blue,
                                     false);
                    break;

                case SlotTeams.Red:
                    text = new pText("Red team wins!", 20, new Vector2(GameBase.WindowManager.WidthScaled / 2, 85), Vector2.Zero, 1, true, Color.Red,
                                     false);
                    break;
                }
            }

            text.TextBold = true;
            text.Origin   = Origins.Centre;
            spriteManagerWideScrolling.Add(text);

            int tabHeight = 113;

            //add
            team1Tabs = new pTabCollection(spriteManagerWideScrolling, 3, new Vector2(56, tabHeight), 0.8f, true, Color.BlueViolet, 40);
            team2Tabs = new pTabCollection(spriteManagerWideScrolling, 3, new Vector2(GameBase.WindowManager.WidthScaled - 224, tabHeight), 0.8f, true, Color.BlueViolet, 40);
            team1Tabs.Add("Total", 0);
            team2Tabs.Add("Total", 0);
            team1Tabs.SetSelected(0);
            team2Tabs.SetSelected(0);
            team1Tabs.OnTabChanged +=
                delegate(object sender, EventArgs e) { loadScores(SlotTeams.Blue, (int)sender, false); };
            team2Tabs.OnTabChanged +=
                delegate(object sender, EventArgs e) { loadScores(SlotTeams.Red, (int)sender, false); };

            int count = PlayerVs.LastScoreEntries.Count;

            for (int i = 0; i < count; i++)
            {
                ScoreboardEntry entry = PlayerVs.LastScoreEntries[i];
                if (entry != null)
                {
                    (entry.Team == SlotTeams.Blue ? team1Tabs : team2Tabs).Add(entry.name, i + 1);
                }
            }

            pSprite scoreBackground1 = new pSprite(TextureManager.Load(@"ranking-panel"), Fields.TopLeft,
                                                   Origins.TopLeft,
                                                   Clocks.Game,
                                                   new Vector2(1, SkinManager.UseNewLayout ? 107 : 97), 0.79f, true, Color.White);

            scoreBackground1.Alpha       = 1.0f;
            scoreBackground1.VectorScale = new Vector2(0.715f, 0.77f);

            pSprite scoreBackground2 = new pSprite(TextureManager.Load(@"ranking-panel"), Fields.TopLeft,
                                                   Origins.TopLeft,
                                                   Clocks.Game,
                                                   new Vector2(GameBase.WindowManager.WidthScaled - 279, SkinManager.UseNewLayout ? 107 : 97), 0.79f, true, Color.White);

            scoreBackground2.Alpha       = 1.0f;
            scoreBackground2.VectorScale = new Vector2(0.715f, 0.77f);
            spriteManagerWideScrolling.Add(scoreBackground1);
            spriteManagerWideScrolling.Add(scoreBackground2);
            initializeStatics();

            //cache scores for more efficiency
            team1Score = getTeamScore(SlotTeams.Blue);
            team2Score = getTeamScore(SlotTeams.Red);

            loadScores(SlotTeams.Blue, 0, true);
            loadScores(SlotTeams.Red, 0, true);

            playMode = Player.Mode;
        }
コード例 #3
0
        internal Options(Game game) : base(game)
        {
            KeyboardHandler.OnKeyPressed += GameBase_OnKeyPressed;

            spriteManager         = new SpriteManager();
            spriteManagerAudio    = new SpriteManager();
            spriteManagerGraphics = new SpriteManager();
            spriteManagerInput    = new SpriteManager();
            spriteManagerOnline   = new SpriteManager();

            int vertSpacing = 30;

            startOffset = ConfigManager.sOffset;

            int t = ConfigManager.sComboFireHeight;

            ConfigManager.sComboFireHeight = 10;
            fireRender = new FireRenderer();
            ConfigManager.sComboFireHeight = t;

            SkinManager.LoadSkin();

            pSprite detailsBack =
                new pSprite(GameBase.WhitePixel, FieldTypes.Window,
                            OriginTypes.TopLeft,
                            ClockTypes.Game,
                            new Vector2(0, 0), 0.7F, true, Color.Black);

            detailsBack.VectorScale    = new Vector2(1024, 83);
            detailsBack.UseVectorScale = true;
            spriteManager.Add(detailsBack);

            pText version = new pText("osu! " + General.BUILD_NAME, 10, new Vector2(640, 0), 0.99f, true, Color.White);

            version.OriginType         = OriginTypes.TopRight;
            version.TextRenderSpecific = false;
            version.TextAa             = false;
            spriteManager.Add(version);

            pTabCollection ptab = new pTabCollection(spriteManager, 10, new Vector2(230, 52), 0.9f, true);

            ptab.TabColour = Color.Tomato;
            ptab.Add("Graphics", spriteManagerGraphics);
            ptab.Add("Audio", spriteManagerAudio);
            ptab.Add("Input", spriteManagerInput);
            ptab.Add("Online", spriteManagerOnline);

            ptab.OnTabChanged += pt_OnTabChanged;

            ptab.SetSelected(spriteManagerGraphics);

            pAnimation back =
                new pAnimation(SkinManager.LoadAll("menu-back"), FieldTypes.Window,
                               OriginTypes.TopLeft,
                               ClockTypes.Game,
                               new Vector2(0, 480), 0.8F, true, new Color(255, 255, 255, (byte)(255 * 0.6)));

            back.SetFramerateFromSkin();
            back.OriginPosition = new Vector2(0, 146);
            back.OnClick       += back_OnClick;
            back.IsClickable    = true;
            back.HoverEffect    = new Transformation(TransformationType.Fade, 0.6F, 1, 0, 300);
            spriteManager.Add(back);

            pText headerText =
                new pText("Options", 30, new Vector2(0, 0), 0.955F, true, new Color(255, 255, 255, 255));

            spriteManager.Add(headerText);

            pText headerText2 = new pText("Change the way osu! behaves", 16, new Vector2(4, 26), 0.955F, true,
                                          new Color(255, 255, 255, 255));

            spriteManager.Add(headerText2);

            pSprite bg =
                new pSprite(SkinManager.Load("playfield"), FieldTypes.Window, OriginTypes.TopLeft,
                            ClockTypes.Game, Vector2.Zero, 0, true, new Color(44, 82, 108));

            spriteManager.Add(bg);

            //Graphics-related

            int vertCurrent = topHeight;

            pText pt =
                new pText("Resolution", 24, new Vector2(160, vertCurrent), Vector2.Zero, 1, true, Color.White, true);

            pt.OriginType = OriginTypes.Centre;
            spriteManagerGraphics.Add(pt);

            vertCurrent += vertSpacing;

            pc640 = new pCheckbox(spriteManagerGraphics, "640x480", new Vector2(10, vertCurrent), 0.8F, false);
            pc640.OnCheckChanged += delegate
            {
                GameBase.SetScreenSize(640, 480);
                UpdateResolutionCheckboxes();
            };

            pc1024 = new pCheckbox(spriteManagerGraphics, "1024x768", new Vector2(160, vertCurrent), 0.8F, false);
            pc1024.OnCheckChanged += delegate
            {
                GameBase.SetScreenSize(1024, 768);
                UpdateResolutionCheckboxes();
            };

            vertCurrent += vertSpacing;


            pc800 = new pCheckbox(spriteManagerGraphics, "800x600", new Vector2(10, vertCurrent), 0.8F, false);
            pc800.OnCheckChanged += delegate
            {
                GameBase.SetScreenSize(800, 600);
                UpdateResolutionCheckboxes();
            };

            pCheckbox pc = new pCheckbox(spriteManagerGraphics, "Fullscreen Mode", new Vector2(160, vertCurrent), 0.8F,
                                         ConfigManager.sFullscreen);

            pc.OnCheckChanged += fullscreen_OnCheckChanged;

            UpdateResolutionCheckboxes();


            vertCurrent += vertSpacing + 40;

            pt =
                new pText("Detail Settings", 24, new Vector2(320, vertCurrent), Vector2.Zero, 1, true, Color.White,
                          true);
            pt.OriginType = OriginTypes.Centre;
            spriteManagerGraphics.Add(pt);

            vertCurrent += vertSpacing;

            pc = new pCheckbox(spriteManagerGraphics, "Limit Framerate", new Vector2(10, vertCurrent), 0.8F,
                               ConfigManager.sFrameSync);
            pc.Tooltip =
                "Limits all internal calculations to 60fps.\nThis will help fix lag problems - try toggling it if you experience lag!";
            pc.OnCheckChanged += frameSync_OnClick;

            pc = new pCheckbox(spriteManagerGraphics, "Snaking Sliders", new Vector2(160, vertCurrent), 0.8F,
                               ConfigManager.sSnakingSliders);
            pc.Tooltip =
                "Sliders gradually snake out from their starting point.\nThis should run fine unless you have an ancient machine.";
            pc.OnCheckChanged += snakingSliders_OnClick;

            vertCurrent += vertSpacing;

            pc = new pCheckbox(spriteManagerGraphics, "Background Video", new Vector2(10, vertCurrent), 0.8F,
                               ConfigManager.sVideo);
            pc.Tooltip =
                "Enable full-window video playback.\nThis requires ffdshow (available from the osu! site).\nNote that if your ffdshow doesn't have a red system-tray icon, it is outdated and will not work correctly";
            pc.OnCheckChanged += video_OnClick;

            pc = new pCheckbox(spriteManagerGraphics, "Shader Effects", new Vector2(160, vertCurrent), 0.8F,
                               ConfigManager.sBloom);
            pc.Tooltip =
                "Enables application of a softening and other shader special effects in gameplay.\nThis requires Pixel Shader 2.0 support, and a relatively powerful PC.\nIf your card is unsupported, this will be automatically disabled.";
            pc.OnCheckChanged += bloom_OnClick;

            vertCurrent += vertSpacing;

            pc = new pCheckbox(spriteManagerGraphics, "Show Combo Fire", new Vector2(10, vertCurrent), 0.8F,
                               ConfigManager.sComboFire);
            pc.Tooltip =
                "When you achieve a combo of 30 or greater, fire will burn from the bottom of the screen.\nThis requires Pixel Shader 2.0 support.\nIf your card is unsupported, this will be automatically disabled.";
            pc.OnCheckChanged += comboFire_OnClick;

            comboFireHeight = new pSliderBar(spriteManagerGraphics, 0, 10, ConfigManager.sComboFireHeight,
                                             new Vector2(150, vertCurrent + 10), 120);
            comboFireHeight.SpriteCollection[1].ToolTip = "Adjust the maximum height of combo fire.";
            comboFireHeight.Visible = ConfigManager.sComboFire;

            vertCurrent = topHeight;

            vertSpacing = 35;

            vertCurrent += vertSpacing;

            pSprite pb =
                new pText("Skin", 24, new Vector2(480, vertCurrent - 16), Vector2.Zero, 1, true, Color.White, true);

            pb.OriginType = OriginTypes.Centre;
            spriteManagerGraphics.Add(pb);

            pb =
                new pSprite(SkinManager.Load("hit300g"), FieldTypes.Window,
                            OriginTypes.Centre,
                            ClockTypes.Game,
                            new Vector2(400, vertCurrent - 16), 0.3F, true, Color.White);
            pb.CurrentScale = 0.8F;
            spriteManagerGraphics.Add(pb);

            pb =
                new pSprite(SkinManager.Load("hit100k"), FieldTypes.Window,
                            OriginTypes.Centre,
                            ClockTypes.Game,
                            new Vector2(560, vertCurrent - 16), 0.3F, true, Color.White);
            pb.CurrentScale = 0.8F;
            spriteManagerGraphics.Add(pb);

            vertCurrent += vertSpacing;

            skinText =
                new pText(SkinManager.Current.SkinName + " by " + SkinManager.Current.SkinAuthor, 20,
                          new Vector2(480, vertCurrent), Vector2.Zero, 1, true, Color.Black, false);
            skinText.OriginType = OriginTypes.Centre;
            spriteManagerGraphics.Add(skinText);

            pb =
                new pSprite(SkinManager.Load("menu-button-background"), FieldTypes.Window,
                            OriginTypes.Centre,
                            ClockTypes.Game,
                            new Vector2(480, vertCurrent), 0.8F, true, Color.White);
            pb.OnClick      += changeSkin_OnClick;
            pb.CurrentScale  = 0.7F;
            pb.CurrentColour = new Color(0, 0, 0, 178);
            pb.IsClickable   = true;
            pb.HoverEffect   = new Transformation(TransformationType.Fade, 0.7F, 1, 0, 200);
            spriteManagerGraphics.Add(pb);

            //Audio
            vertCurrent = topHeight;

            pb =
                new pText("Volume", 24, new Vector2(320, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerAudio.Add(pb);

            vertCurrent += vertSpacing - 8;

            vertSpacing = 25;

            pb =
                new pText("Master", 20, new Vector2(230, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerAudio.Add(pb);

            masterVolume =
                new pSliderBar(spriteManagerAudio, 0, 100, AudioEngine.VolumeUniversal, new Vector2(280, vertCurrent), 180);

            vertCurrent += vertSpacing;

            pb =
                new pText("Music", 20, new Vector2(230, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerAudio.Add(pb);

            musicVolume =
                new pSliderBar(spriteManagerAudio, 0, 100, AudioEngine.VolumeMusic, new Vector2(280, vertCurrent), 180);

            vertCurrent += vertSpacing;

            pb            = new pText("Effect", 20, new Vector2(230, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerAudio.Add(pb);
            vertSpacing = 35;

            effectVolume =
                new pSliderBar(spriteManagerAudio, 0, 100, AudioEngine.VolumeEffect, new Vector2(280, vertCurrent), 180);

            vertCurrent += vertSpacing * 3;

            pb =
                new pText("Universal Audio Offset", 20, new Vector2(320, vertCurrent), Vector2.Zero, 1, true,
                          Color.White, true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerAudio.Add(pb);

            vertCurrent += 25;

            pb =
                new pText(
                    "Use left/right arrows to adjust until you can no longer hear the two\nseparate sounds.  This is not perfect, but will be improved soon.",
                    12, new Vector2(320, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerAudio.Add(pb);

            vertCurrent += vertSpacing;

            audioOffset =
                new pSliderBar(spriteManagerAudio, -300, 300, ConfigManager.sOffset, new Vector2(180, vertCurrent), 200);

            audioOffsetText =
                new pText("", 20, new Vector2(440, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            audioOffsetText.OriginType = OriginTypes.Centre;
            spriteManagerAudio.Add(audioOffsetText);

            //Input
            vertCurrent = topHeight;

            pb =
                new pText("Mouse Sensitivity", 24, new Vector2(480, vertCurrent), Vector2.Zero, 1, true, Color.White,
                          true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerInput.Add(pb);

            vertCurrent += vertSpacing;

            pb = new pText("The default rate is the same as your desktop mouse speed.", 14,
                           new Vector2(480, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerInput.Add(pb);

            vertCurrent += vertSpacing;

            mouseSpeed =
                new pSliderBar(spriteManagerInput, 0.5, 4, ConfigManager.sMouseSpeed, new Vector2(370, vertCurrent), 200);

            mouseSpeedText =
                new pText("", 20, new Vector2(600, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            mouseSpeedText.OriginType = OriginTypes.Centre;
            spriteManagerInput.Add(mouseSpeedText);

            vertCurrent = topHeight;

            pt =
                new pText("Toggles", 24, new Vector2(160, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pt.OriginType = OriginTypes.Centre;
            spriteManagerInput.Add(pt);
            vertCurrent += vertSpacing;

            pc = new pCheckbox(spriteManagerInput, "Disable mouse wheel in play mode", new Vector2(10, vertCurrent), 0.8F,
                               ConfigManager.sMouseDisableWheel);
            pc.Tooltip =
                "During play, you can use the mouse wheel to adjust the volume and pause the game.\nThis will disable that functionality";
            pc.OnCheckChanged += disableMouseWheel_OnClick;

            vertCurrent += vertSpacing;

            pc = new pCheckbox(spriteManagerInput, "Disable mouse buttons in play mode", new Vector2(10, vertCurrent), 0.8F,
                               ConfigManager.sMouseDisableButtons);
            pc.Tooltip =
                "This option will disable all mouse buttons.\nSpecifically for people who use Z/X/Ctrl/Space to click.";
            pc.OnCheckChanged += disableMouseButtons_OnClick;

            vertCurrent += vertSpacing;

            pc = new pCheckbox(spriteManagerInput, "Force TabletPC support", new Vector2(10, vertCurrent), 0.8F,
                               ConfigManager.sTablet);
            pc.Tooltip =
                "osu! attempts to auto-detect if you are running on a tablet PC.\nThis sometimes fails depending on the operating sytem.\nEnable this if you are running a TabletPC or using a tablet and your clicks aren't handled correctly.";
            pc.OnCheckChanged += tablet_OnClick;

            vertCurrent += vertSpacing;

            pt =
                new pText("Key Bindings", 24, new Vector2(320, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pt.OriginType = OriginTypes.Centre;
            spriteManagerInput.Add(pt);
            vertCurrent += vertSpacing - 10;

            pt1 = new pText(ConfigManager.sKeyboardBind1.ToString(), 24, new Vector2(330, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pButton pbutton = new pButton("Main 1 (Taiko Inner-Left)", new Vector2(20, vertCurrent), new Vector2(260, 30), 0.9f, Color.DarkOrange, delegate { GameBase.ShowDialog(new OptionsBindKey(delegate(object sender, EventArgs e) { ConfigManager.sKeyboardBind1 = (Keys)sender; InputManager.CheckBindings(); UpdateBindings(); }, "Binding: Main 1 (Taiko Centre-Left)")); });

            spriteManagerInput.AddRange(pbutton.SpriteCollection);
            spriteManagerInput.Add(pt1);
            vertCurrent += vertSpacing;

            pt2     = new pText(ConfigManager.sKeyboardBind3.ToString(), 24, new Vector2(330, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pbutton = new pButton("Main 2 (Taiko Inner-Right)", new Vector2(20, vertCurrent), new Vector2(260, 30), 0.9f, Color.DarkOrange, delegate { GameBase.ShowDialog(new OptionsBindKey(delegate(object sender, EventArgs e) { ConfigManager.sKeyboardBind3 = (Keys)sender; InputManager.CheckBindings(); UpdateBindings(); }, "Binding: Main 2 (Taiko Inner-Right)")); });
            spriteManagerInput.AddRange(pbutton.SpriteCollection);
            spriteManagerInput.Add(pt2);
            vertCurrent += vertSpacing;

            pt3     = new pText(ConfigManager.sKeyboardBind2.ToString(), 24, new Vector2(330, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pbutton = new pButton("Alt 1 (Taiko Outer-Left)", new Vector2(20, vertCurrent), new Vector2(260, 30), 0.9f, Color.DarkOrange, delegate { GameBase.ShowDialog(new OptionsBindKey(delegate(object sender, EventArgs e) { ConfigManager.sKeyboardBind2 = (Keys)sender; InputManager.CheckBindings(); UpdateBindings(); }, "Binding: Alt 1 (Taiko Outer-Left)")); });
            spriteManagerInput.AddRange(pbutton.SpriteCollection);
            spriteManagerInput.Add(pt3);
            vertCurrent += vertSpacing;

            pt4     = new pText(ConfigManager.sKeyboardBind4.ToString(), 24, new Vector2(330, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pbutton = new pButton("Alt 2 (Taiko Outer-Right)", new Vector2(20, vertCurrent), new Vector2(260, 30), 0.9f, Color.DarkOrange, delegate { GameBase.ShowDialog(new OptionsBindKey(delegate(object sender, EventArgs e) { ConfigManager.sKeyboardBind4 = (Keys)sender; InputManager.CheckBindings(); UpdateBindings(); }, "Binding: Alt 2 (Taiko Outer-Right)")); });
            spriteManagerInput.AddRange(pbutton.SpriteCollection);
            spriteManagerInput.Add(pt4);



            //Online
            vertCurrent = topHeight;

            pb =
                new pText("Toggles", 24, new Vector2(160, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerOnline.Add(pb);

            vertCurrent += vertSpacing;

            pCheckbox pc1 = new pCheckbox(spriteManagerOnline, "Show chat ticker", new Vector2(10, vertCurrent), 0.8F,
                                          ConfigManager.sTicker);

            pc1.Tooltip         = "Popup new chat messages in a one-line display at the bottom of the screen\nwhen the chat console is not visible";
            pc1.OnCheckChanged += delegate { ChatEngine.ticker_OnClick(null, null); pc1.SetStatusQuietly(ConfigManager.sTicker); };

            vertCurrent += vertSpacing;

            pCheckbox pc2 = new pCheckbox(spriteManagerOnline, "Automatically hide chat", new Vector2(10, vertCurrent), 0.8F,
                                          ConfigManager.sAutoChatHide);

            pc2.Tooltip         = "When enabled, chat will automatically hide itself during gameplay.\nIt will be visible during breaks and intro/outro time.";
            pc2.OnCheckChanged += delegate { ChatEngine.hideMode_OnClick(null, null); pc2.SetStatusQuietly(ConfigManager.sAutoChatHide); };

            vertCurrent += vertSpacing;

            pCheckbox pc3 = new pCheckbox(spriteManagerOnline, "Popup notification when someone says your name", new Vector2(10, vertCurrent), 0.8F,
                                          ConfigManager.sChatHighlightName);

            pc3.Tooltip         = "A message will flash at the bottom of your screen (even during gameplay)\nwhen someone mentions yourname in chat.";
            pc3.OnCheckChanged += delegate { ConfigManager.sChatHighlightName = !ConfigManager.sChatHighlightName; pc3.SetStatusQuietly(ConfigManager.sChatHighlightName); };

            vertCurrent += vertSpacing;

            pCheckbox pc4 = new pCheckbox(spriteManagerOnline, "Share your city location with others", new Vector2(10, vertCurrent), 0.8F,
                                          ConfigManager.sDisplayCityLocation);

            pc4.Tooltip         = "By default, other users will only be able to see your country.  Enabling this adds your city to the\npublicly visible location.  This is usually quite accurate.";
            pc4.OnCheckChanged += delegate { ConfigManager.sDisplayCityLocation = !ConfigManager.sDisplayCityLocation; pc4.SetStatusQuietly(ConfigManager.sDisplayCityLocation); };

            vertCurrent = topHeight;

            pb =
                new pText("Active User", 24, new Vector2(480, vertCurrent), Vector2.Zero, 1, true, Color.White, true);
            pb.OriginType = OriginTypes.Centre;
            spriteManagerOnline.Add(pb);

            vertCurrent += vertSpacing;

            pb =
                new pSprite(SkinManager.Load("menu-button-background"), FieldTypes.Window,
                            OriginTypes.Centre,
                            ClockTypes.Game,
                            new Vector2(480, vertCurrent), 0.8F, true, Color.White);
            pb.OnClick      += provideLogin_OnClick;
            pb.CurrentScale  = 0.7F;
            pb.CurrentColour = new Color(0, 0, 0, 178);
            pb.IsClickable   = true;
            pb.HoverEffect   = new Transformation(TransformationType.Fade, 0.7F, 1, 0, 200);
            spriteManagerOnline.Add(pb);

            account =
                new pText("Click to login!", 20, new Vector2(480, vertCurrent), Vector2.Zero, 1, true, Color.Black,
                          false);
            account.OriginType = OriginTypes.Centre;
            spriteManagerOnline.Add(account);

            updateAccount();


            GameBase.LoadComplete();
        }