Ejemplo n.º 1
0
        private void RestoreSettings()
        {
            bool isPlayed = CurrentMapHasBeenPlayed;

            if (BeatmapManager.Current.VisualSettingsOverride)
            {
                backgroundTransparency.SetValue(EventManager.UserDimLevel = (BeatmapManager.Current.DimLevel ?? ConfigManager.sDimLevel.Value), true);

                checkboxStoryboard.SetStatusQuietly(!(EventManager.ShowStoryboard = (!isPlayed && !BeatmapManager.Current.EpilepsyWarning) || !BeatmapManager.Current.DisableStoryboard));
                checkboxVideo.SetStatusQuietly(!(EventManager.ShowVideo = ConfigManager.sVideo && !BeatmapManager.Current.DisableVideo));
                checkboxSkin.SetStatusQuietly(SkinManager.IgnoreBeatmapSkin         = isPlayed && BeatmapManager.Current.DisableSkin);
                checkboxHitsounds.SetStatusQuietly(AudioEngine.IgnoreBeatmapSamples = isPlayed && BeatmapManager.Current.DisableSamples);
            }
            else
            {
                backgroundTransparency.SetValue(EventManager.UserDimLevel = ConfigManager.sDimLevel.Value, true);

                checkboxStoryboard.SetStatusQuietly(!(EventManager.ShowStoryboard = ConfigManager.sShowStoryboard));
                checkboxVideo.SetStatusQuietly(!(EventManager.ShowVideo = ConfigManager.sVideo));
                checkboxSkin.SetStatusQuietly(SkinManager.IgnoreBeatmapSkin         = ConfigManager.sIgnoreBeatmapSkins);
                checkboxHitsounds.SetStatusQuietly(AudioEngine.IgnoreBeatmapSamples = ConfigManager.sIgnoreBeatmapSamples);
            }

            updateBackgroundTransparencyTooltip();
        }
        internal OptionsManiaBindingWizard()
            : base(LocalisationManager.GetString(OsuString.Options_TabSkin_CustonKey), false)
        {
            SkinManager.CreateUserSkin();

            spriteManager.HandleOverlayInput = true;
            BackButton back = new BackButton(delegate { Close(); }, false, true);

            spriteManager.Add(back.SpriteCollection);

            int horizontal  = 225 + (int)GameBase.WindowManager.OffsetXScaled;
            int vertCurrent = 80;
            int vertSpacing = 35;

            dKeyConfig = new pDropdown(spriteManager, String.Empty, new Vector2(horizontal + 10, vertCurrent), 75, 1);

            for (int i = 1; i <= StageMania.MAX_COLUMNS; incrementKeyConfig(ref i))
            {
                dKeyConfig.AddOption(getKeyOptionText(i, i >= 10), i);
            }

            dKeyConfig.OnSelect += (obj, ev) =>
            {
                currentKeyConfig = (int)obj;

                cBindAlternateKeys.SetStatusQuietly(false);

                LoadKeys(true);
            };

            cSplitLayout = new pCheckbox(LocalisationManager.GetString(OsuString.Options_TabSkin_SplitLayout), new Vector2(horizontal + 105, vertCurrent), 0.8F, false);
            cSplitLayout.OnCheckChanged += (obj, bl) =>
            {
                LoadKeys();
            };
            spriteManager.Add(cSplitLayout.SpriteCollection);

            vertCurrent = 300;

            dSpecialStyle = new pDropdown(spriteManager, string.Empty, new Vector2(horizontal - 65, vertCurrent), 150, 0.8f, false);
            dSpecialStyle.AddOption(LocalisationManager.GetString(OsuString.Options_ManiaSpecial_Normal), 0);
            dSpecialStyle.AddOption(LocalisationManager.GetString(OsuString.Options_ManiaSpecial_Left), 1);
            dSpecialStyle.AddOption(LocalisationManager.GetString(OsuString.Options_ManiaSpecial_Right), 2);
            dSpecialStyle.OnSelect += (obj, ev) =>
            {
                switch ((int)obj)
                {
                case 1:
                    stage.Skin.SpecialStyle = ManiaSpecialStyle.Left;
                    break;

                case 2:
                    stage.Skin.SpecialStyle = ManiaSpecialStyle.Right;
                    break;

                default:
                    stage.Skin.SpecialStyle = ManiaSpecialStyle.None;
                    break;
                }
                SkinManager.SaveSkin();

                LoadKeys();
            };

            cBindAlternateKeys = new pCheckbox(LocalisationManager.GetString(OsuString.Options_TabSkin_BindAlternateSpecialKeys), new Vector2(horizontal + 105, vertCurrent), 0.8F, false);
            cBindAlternateKeys.OnCheckChanged += (obj, bl) =>
            {
                LoadKeys();
            };
            spriteManager.Add(cBindAlternateKeys.SpriteCollection);

            vertCurrent += vertSpacing;

            cUpsideDown = new pCheckbox(LocalisationManager.GetString(OsuString.Options_TabSkin_UpsiedDown), new Vector2(horizontal, vertCurrent), 0.8F, false);
            cUpsideDown.OnCheckChanged += (obj, bl) =>
            {
                stage.Skin.UpsideDown = bl;
                SkinManager.SaveSkin();
            };
            spriteManager.Add(cUpsideDown.SpriteCollection);

            vertCurrent += vertSpacing;

            cJudgementLine = new pCheckbox(LocalisationManager.GetString(OsuString.Options_TabSkin_ShowJudgement), new Vector2(horizontal, vertCurrent), 0.8F, false);
            cJudgementLine.OnCheckChanged += (obj, bl) =>
            {
                stage.Skin.JudgementLine = bl;
                SkinManager.SaveSkin();
            };

            spriteManager.Add(cJudgementLine.SpriteCollection);

            dKeyConfig.SetSelected(currentKeyConfig, false);
        }
        internal void LoadKeys(bool setDefaultSplitStages = false)
        {
            currentBindingColumn = 0;

            spriteManager.SpriteList.FindAll(s => s.Tag == this).ForEach(s =>
            {
                s.FadeOut(50);
                s.AlwaysDraw = false;
                spriteManager.Remove(s);
            });

            disposeManiaStage();

            SkinMania skin = SkinManager.LoadManiaSkin(currentKeyConfig);

            cSplitLayout.Enabled = currentKeyConfig > 1 && skin.SplitStagesFromSkin == null;
            if (!setDefaultSplitStages)
            {
                skin.SplitStages = cSplitLayout.Checked;
            }
            cSplitLayout.SetStatusQuietly(skin.SplitStages);

            dKeyConfig.SpriteMainBox.Text = getKeyOptionText(currentKeyConfig, skin.SplitStages);

            stage = new StageMania(skin, true);

            //Validate the layout by recopying it to itself
            stage.CopyBindingToLayout(stage.LayoutList.Layout);

            dSpecialStyle.Enabled = stage.AllowSpecialStyle;

            switch (stage.SpecialStyle)
            {
            case ManiaSpecialStyle.Left:
                dSpecialStyle.SetSelected(1, true);
                break;

            case ManiaSpecialStyle.Right:
                dSpecialStyle.SetSelected(2, true);
                break;

            default:
                dSpecialStyle.SetSelected(0, true);
                break;
            }

            cBindAlternateKeys.Enabled = stage.SpecialStyle != ManiaSpecialStyle.None;
            if (stage.SpecialStyle == ManiaSpecialStyle.None)
            {
                cBindAlternateKeys.SetStatusQuietly(false);
            }

            cJudgementLine.SetStatusQuietly(skin.JudgementLine);
            cUpsideDown.SetStatusQuietly(skin.UpsideDown);

            float delta      = 40f;
            float separation = skin.SplitStages ? 1f : 0f;
            float totalWidth = (currentKeyConfig + separation) * delta;

            //Scale down if the keys are too wide to fit on the screen
            float scale = Math.Min(1f, GameBase.WindowManager.WidthScaled / totalWidth);

            totalWidth *= scale;
            delta      *= scale;
            float start = (GameBase.WindowManager.WidthScaled - totalWidth) / 2;

            arrow          = new pSprite(TextureManager.LoadFirstAvailable(new[] { @"arrow-generic", @"play-warningarrow" }, SkinSource.Osu), Fields.TopLeft, Origins.CentreLeft, Clocks.Game, new Vector2(0, 100), 0.92f, true, GameBase.NewGraphicsAvailable ? Color.SkyBlue : Color.White);
            arrow.Tag      = this;
            arrow.Rotation = OsuMathHelper.PiOver2;
            spriteManager.Add(arrow);

            keys = new pText[currentKeyConfig];
            int layoutIndex = 0;

            for (int i = 0; i < currentKeyConfig; i++)
            {
                bool skip = false;
                if (cBindAlternateKeys.Checked)
                {
                    skip = true;
                    foreach (StageMania s in stage)
                    {
                        if (i == s.Columns[s.SpecialColumn])
                        {
                            skip = false;
                        }
                    }
                }

                if (!skip)
                {
                    pSprite p = new pSprite(TextureManager.Load(@"mania-key1D", SkinSource.Osu), Fields.TopLeft, Origins.TopLeft, Clocks.Game, new Vector2(start, 192), 0.92f, true, stage.Columns[i].Colour);
                    p.VectorScale = 1.3f * new Vector2(scale, 1f);
                    p.Tag         = this;
                    spriteManager.Add(p);

                    keys[i]            = new pText(getKeyText(i), Math.Max(1, (int)Math.Round(14 * scale)), new Vector2(start + delta / 2f, 192 + 40), 0.93f, true, Color.White);
                    keys[i].TextBorder = true;
                    keys[i].Origin     = Origins.Centre;
                    keys[i].Tag        = this;
                    keys[i].TagNumeric = layoutIndex;
                    spriteManager.Add(keys[i]);

                    //Found the first non-skipped key
                    if (layoutIndex++ == 0)
                    {
                        currentBindingColumn = i;
                        arrow.Position.X     = start + delta / 2;
                    }
                }

                start += delta + delta * (i == stage.PrimaryStageColumns - 1 ? separation : 0);
            }
        }
Ejemplo n.º 4
0
 void binding_ValueChanged(object sender, EventArgs e)
 {
     Checkbox.SetStatusQuietly(binding.Value);
 }
Ejemplo n.º 5
0
 private void UpdateResolutionCheckboxes()
 {
     pc640.SetStatusQuietly(GameBase.WindowWidth == 640);
     pc800.SetStatusQuietly(GameBase.WindowWidth == 800);
     pc1024.SetStatusQuietly(GameBase.WindowWidth == 1024);
 }
Ejemplo n.º 6
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();
        }