diff --git a/SteamController/Controller.cs b/SteamController/Controller.cs index 7cf961e..b984fe2 100644 --- a/SteamController/Controller.cs +++ b/SteamController/Controller.cs @@ -63,20 +63,6 @@ namespace SteamController contextMenu.Items.Add(new ToolStripSeparator()); -#if DEBUG - var lizardMouseItem = new ToolStripMenuItem("Use Lizard &Mouse"); - lizardMouseItem.Click += delegate { DefaultGuideShortcutsProfile.SteamModeLizardMouse = !DefaultGuideShortcutsProfile.SteamModeLizardMouse; }; - contextMenu.Opening += delegate { lizardMouseItem.Checked = DefaultGuideShortcutsProfile.SteamModeLizardMouse; }; - contextMenu.Items.Add(lizardMouseItem); - - var lizardButtonsItem = new ToolStripMenuItem("Use Lizard &Buttons"); - lizardButtonsItem.Click += delegate { DefaultGuideShortcutsProfile.SteamModeLizardButtons = !DefaultGuideShortcutsProfile.SteamModeLizardButtons; }; - contextMenu.Opening += delegate { lizardButtonsItem.Checked = DefaultGuideShortcutsProfile.SteamModeLizardButtons; }; - contextMenu.Items.Add(lizardButtonsItem); - - contextMenu.Items.Add(new ToolStripSeparator()); -#endif - AddSteamOptions(contextMenu); if (startupManager.IsAvailable) @@ -316,7 +302,8 @@ namespace SteamController Desktop = ProfilesSettings.DesktopPanelSettings.Default, X360 = ProfilesSettings.X360BackPanelSettings.Default, X360Haptic = ProfilesSettings.X360HapticSettings.Default, - Application = Settings.Default + Application = Settings.Default, + DEBUG = SettingsDebug.Default } }; diff --git a/SteamController/Profiles/DefaultGuideShortcutsProfile.cs b/SteamController/Profiles/DefaultGuideShortcutsProfile.cs index a81e8a5..c1d5b85 100644 --- a/SteamController/Profiles/DefaultGuideShortcutsProfile.cs +++ b/SteamController/Profiles/DefaultGuideShortcutsProfile.cs @@ -8,9 +8,6 @@ namespace SteamController.Profiles { public abstract class DefaultGuideShortcutsProfile : DefaultShortcutsProfile { - public static bool SteamModeLizardButtons = false; - public static bool SteamModeLizardMouse = true; - public readonly TimeSpan HoldForKill = TimeSpan.FromSeconds(3); public readonly TimeSpan HoldForClose = TimeSpan.FromSeconds(1); @@ -32,8 +29,8 @@ namespace SteamController.Profiles private void SteamShortcuts(Context c) { - c.Steam.LizardButtons = SteamModeLizardButtons; - c.Steam.LizardMouse = SteamModeLizardMouse; + c.Steam.LizardButtons = SettingsDebug.Default.LizardButtons; + c.Steam.LizardMouse = SettingsDebug.Default.LizardMouse; EmulateScrollOnLPad(c); EmulateMouseOnRPad(c); diff --git a/SteamController/Profiles/DesktopProfile.cs b/SteamController/Profiles/DesktopProfile.cs index cc65977..64d3ce0 100644 --- a/SteamController/Profiles/DesktopProfile.cs +++ b/SteamController/Profiles/DesktopProfile.cs @@ -37,8 +37,8 @@ namespace SteamController.Profiles } else { - c.Steam.LizardButtons = SteamModeLizardButtons; - c.Steam.LizardMouse = SteamModeLizardMouse; + c.Steam.LizardButtons = SettingsDebug.Default.LizardButtons; + c.Steam.LizardMouse = SettingsDebug.Default.LizardMouse; } EmulateScrollOnLPad(c); diff --git a/SteamController/Profiles/X360Profile.cs b/SteamController/Profiles/X360Profile.cs index 6e59c16..3a90234 100644 --- a/SteamController/Profiles/X360Profile.cs +++ b/SteamController/Profiles/X360Profile.cs @@ -17,7 +17,7 @@ namespace SteamController.Profiles public override Status Run(Context context) { context.Steam.LizardButtons = false; - context.Steam.LizardMouse = SteamModeLizardMouse; + context.Steam.LizardMouse = SettingsDebug.Default.LizardMouse; context.X360.Connected = true; // Controls diff --git a/SteamController/Settings.cs b/SteamController/Settings.cs index 26699c4..c56b231 100644 --- a/SteamController/Settings.cs +++ b/SteamController/Settings.cs @@ -13,7 +13,7 @@ namespace SteamController { } - [BrowsableAttribute(false)] + [Browsable(false)] public bool EnableSteamDetection { get { return Get("EnableSteamDetection", false); } @@ -21,7 +21,7 @@ namespace SteamController } [Description("Default profile used when going back to Desktop mode")] - [BrowsableAttribute(true)] + [Browsable(true)] [TypeConverter(typeof(ProfilesSettings.Helpers.ProfileStringConverter))] public string DefaultProfile { @@ -36,7 +36,7 @@ namespace SteamController } [Description("Scroll direction for right pad and joystick.")] - [BrowsableAttribute(true)] + [Browsable(true)] public ScrollMode ScrollDirection { get { return Get("ScrollDirection", ScrollMode.DownScrollDown); } @@ -49,7 +49,7 @@ namespace SteamController Overwrite } - [BrowsableAttribute(true)] + [Browsable(true)] [Description("This does replace Steam configuration for controllers to prevent double inputs. " + "Might require going to Steam > Settings > Controller > Desktop to apply " + "'SteamController provided empty configuration'.")] @@ -59,9 +59,7 @@ namespace SteamController set { Set("SteamControllerConfigs", value); } } - [UserScopedSetting] - [BrowsableAttribute(true)] - [DefaultSettingValue("True")] + [Browsable(true)] [Description("Show Touch Keyboard or CTRL+WIN+O")] public bool ShowTouchKeyboard { diff --git a/SteamController/SettingsDebug.cs b/SteamController/SettingsDebug.cs new file mode 100644 index 0000000..bfc380e --- /dev/null +++ b/SteamController/SettingsDebug.cs @@ -0,0 +1,27 @@ +using System.ComponentModel; +using System.Configuration; + +namespace SteamController +{ + [Category("Settings")] + [TypeConverter(typeof(ExpandableObjectConverter))] + internal sealed partial class SettingsDebug : CommonHelpers.BaseSettings + { + public static readonly SettingsDebug Default = new SettingsDebug(); + + public SettingsDebug() : base("SettingsDebug") + { + } + + [Description("Use Lizard Buttons instead of emulated. This option is only for testing purposes.")] + public bool LizardButtons { get; set; } = false; + + [Description("Use Lizard Mouse instead of emulated. This option is only for testing purposes.")] + public bool LizardMouse { get; set; } = true; + + public override string ToString() + { + return ""; + } + } +}