Example #1
0
        private void load(VerifyScreen verify)
        {
            hiddenIssueTypes = verify.HiddenIssueTypes.GetBoundCopy();

            foreach (IssueType issueType in configurableIssueTypes)
            {
                var checkbox = new SettingsCheckbox
                {
                    Anchor    = Anchor.CentreLeft,
                    Origin    = Anchor.CentreLeft,
                    LabelText = issueType.ToString(),
                    Current   = { Default = !hiddenIssueTypes.Contains(issueType) }
                };

                checkbox.Current.SetDefault();
                checkbox.Current.BindValueChanged(state =>
                {
                    if (!state.NewValue)
                    {
                        hiddenIssueTypes.Add(issueType);
                    }
                    else
                    {
                        hiddenIssueTypes.Remove(issueType);
                    }
                });

                Flow.Add(checkbox);
            }
        }
Example #2
0
        private void load(OsuConfigManager osuConfig, FrameworkConfigManager config)
        {
            // use local bindable to avoid changing enabled state of game host's bindable.
            handlerSensitivity = mouseHandler.Sensitivity.GetBoundCopy();
            localSensitivity   = handlerSensitivity.GetUnboundCopy();

            relativeMode = mouseHandler.UseRelativeMode.GetBoundCopy();
            windowMode   = config.GetBindable <WindowMode>(FrameworkSetting.WindowMode);

            Children = new Drawable[]
            {
                highPrecisionMouse = new SettingsCheckbox
                {
                    LabelText   = MouseSettingsStrings.HighPrecisionMouse,
                    TooltipText = MouseSettingsStrings.HighPrecisionMouseTooltip,
                    Current     = relativeMode,
                    Keywords    = new[] { @"raw", @"input", @"relative", @"cursor" }
                },
                new SensitivitySetting
                {
                    LabelText = MouseSettingsStrings.CursorSensitivity,
                    Current   = localSensitivity
                },
                confineMouseModeSetting = new SettingsEnumDropdown <OsuConfineMouseMode>
                {
                    LabelText = MouseSettingsStrings.ConfineMouseMode,
                    Current   = osuConfig.GetBindable <OsuConfineMouseMode>(OsuSetting.ConfineMouseMode)
                },
                new SettingsCheckbox
                {
                    LabelText   = MouseSettingsStrings.DisableMouseWheelVolumeAdjust,
                    TooltipText = MouseSettingsStrings.DisableMouseWheelVolumeAdjustTooltip,
                    Current     = osuConfig.GetBindable <bool>(OsuSetting.MouseDisableWheel)
                },
                new SettingsCheckbox
                {
                    LabelText = MouseSettingsStrings.DisableMouseButtons,
                    Current   = osuConfig.GetBindable <bool>(OsuSetting.MouseDisableButtons)
                },
            };
        }
Example #3
0
 private void load(OsuColour colours, OsuConfigManager config)
 {
     InternalChild = new Container
     {
         Masking          = true,
         CornerRadius     = 20,
         AutoSizeAxes     = Axes.Both,
         AutoSizeDuration = 500,
         AutoSizeEasing   = Easing.OutQuint,
         Anchor           = Anchor.Centre,
         Origin           = Anchor.Centre,
         Children         = new Drawable[]
         {
             new Box
             {
                 Colour           = colours.GreySeafoamDark,
                 RelativeSizeAxes = Axes.Both,
             },
             new FillFlowContainer
             {
                 Margin       = new MarginPadding(20),
                 AutoSizeAxes = Axes.Both,
                 Direction    = FillDirection.Vertical,
                 Anchor       = Anchor.Centre,
                 Origin       = Anchor.Centre,
                 Spacing      = new Vector2(15),
                 Children     = new Drawable[]
                 {
                     new OsuSpriteText
                     {
                         Text   = "Spectator Mode",
                         Font   = OsuFont.Default.With(size: 30),
                         Anchor = Anchor.Centre,
                         Origin = Anchor.Centre,
                     },
                     new FillFlowContainer
                     {
                         AutoSizeAxes = Axes.Both,
                         Direction    = FillDirection.Horizontal,
                         Anchor       = Anchor.Centre,
                         Origin       = Anchor.Centre,
                         Spacing      = new Vector2(15),
                         Children     = new Drawable[]
                         {
                             new UserGridPanel(targetUser)
                             {
                                 Anchor = Anchor.CentreLeft,
                                 Origin = Anchor.CentreLeft,
                                 Height = 145,
                                 Width  = 290,
                             },
                             new SpriteIcon
                             {
                                 Size   = new Vector2(40),
                                 Icon   = FontAwesome.Solid.ArrowRight,
                                 Anchor = Anchor.CentreLeft,
                                 Origin = Anchor.CentreLeft,
                             },
                             beatmapPanelContainer = new Container
                             {
                                 AutoSizeAxes = Axes.Both,
                                 Anchor       = Anchor.CentreLeft,
                                 Origin       = Anchor.CentreLeft,
                             },
                         }
                     },
                     automaticDownload = new SettingsCheckbox
                     {
                         LabelText = "Automatically download beatmaps",
                         Current   = config.GetBindable <bool>(OsuSetting.AutomaticallyDownloadWhenSpectating),
                         Anchor    = Anchor.Centre,
                         Origin    = Anchor.Centre,
                     },
                     watchButton = new PurpleTriangleButton
                     {
                         Text    = "Start Watching",
                         Width   = 250,
                         Anchor  = Anchor.Centre,
                         Origin  = Anchor.Centre,
                         Action  = attemptStart,
                         Enabled = { Value = false }
                     }
                 }
             }
         }
     };
 }