diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index edb249c..d66879a 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("SettingsRedux")] -[assembly: AssemblyDescription("Replaces the Neos Settings page with something new")] +[assembly: AssemblyDescription("Replaces the Resonite Settings page with a new tabbed layout")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("XDelta")] +[assembly: AssemblyCompany("Delta")] [assembly: AssemblyProduct("SettingsRedux")] -[assembly: AssemblyCopyright("Copyright © XDelta 2022")] +[assembly: AssemblyCopyright("Copyright © Delta 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0")] -[assembly: AssemblyFileVersion("1.1.0")] +[assembly: AssemblyVersion("2.0.0")] +[assembly: AssemblyFileVersion("2.0.0")] diff --git a/README.md b/README.md index 760b046..6f725cc 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,27 @@ # SettingsRedux -A [NeosModLoader](https://github.com/neos-modding-group/NeosModLoader) mod for [Neos VR](https://neos.com/). Replaces the default Neos Settings page with an enhanced settings page that adds in many QoL changes. +A [ResoniteModLoader](https://github.com/resonite-modding-group/ResoniteModLoader) mod for [Resonite](https://resonite.com/). Replaces the default Resonite Settings page with an enhanced settings page that adds in many QoL changes. These changes include: - Categorized Tabs and grouped related settings together - Alternating line colors -- Larger text (~15% Larger) -- Increased the maxValue for some settings (ex: Dash Open/Close Speed) +- Larger text +- Increased the max value for some settings (ex: Dash Open/Close Speed) ## Installation -1. Install [NeosModLoader](https://github.com/neos-modding-group/NeosModLoader). -1. Place [SettingsRedux.dll](https://github.com/XDelta/SettingsRedux/releases/latest/download/SettingsRedux.dll) into your `nml_mods` folder. This folder should be at `C:\Program Files (x86)\Steam\steamapps\common\NeosVR\nml_mods` for a default install. You can create it if it's missing, or if you launch the game once with NeosModLoader installed it will create the folder for you. -1. Start the game. If you want to verify that the mod is working you can check your Neos logs. +1. Install [ResoniteModLoader](https://github.com/resonite-modding-group/ResoniteModLoader). +1. Place [SettingsRedux.dll](https://github.com/XDelta/SettingsRedux/releases/latest/download/SettingsRedux.dll) into your `rml_mods` folder. This folder should be at `C:\Program Files (x86)\Steam\steamapps\common\Resonite\rml_mods` for a default install. You can create it if it's missing, or if you launch the game once with ResoniteModLoader installed it will create the folder for you. +1. Start the game. If you want to verify that the mod is working you can check your Resonite logs. ## Config Options | Config Option | Default | Description | | ------------------ | ------- | ----------- | -| `enableSettingReplacement` | `true` | If `false` the default Neos Settings page will be restored, no restart required | +| `enableSettingReplacement` | `true` | If `false` the default Resonite Settings page will be restored, no restart required | | `useLinearSliders` | `false` | If `true`, sliders will be linear instead of exponential ones (Requires restart)| -![Image of Audio Tab](https://user-images.githubusercontent.com/7883807/204910880-2c9e0a4e-e331-4dbf-aa25-eb161b558707.png) +![Image of Audio Tab](https://github.com/XDelta/SettingsRedux/assets/7883807/78ecb1d1-778c-49df-9bcf-30fbc5931a5b) -![Image of Controls Tab](https://user-images.githubusercontent.com/7883807/204910625-905c1510-c8eb-4632-8a90-b7c3fe46b670.png) +![Image of Controls Tab](https://github.com/XDelta/SettingsRedux/assets/7883807/3a2e9b9d-fb98-4e68-bfae-03b39a3bdd23) diff --git a/SettingsRedux.cs b/SettingsRedux.cs index 774dfce..9ca9fde 100644 --- a/SettingsRedux.cs +++ b/SettingsRedux.cs @@ -1,477 +1,517 @@ using System; -using BaseX; +using Elements.Core; using FrooxEngine; using FrooxEngine.UIX; using static FrooxEngine.LocaleHelper; using HarmonyLib; -using NeosModLoader; +using ResoniteModLoader; using System.Collections.Generic; using FrooxEngine.CommonAvatar; -using QuantityX; using System.Reflection; +using Elements.Quantity; -namespace SettingsRedux { - public class SettingsRedux : NeosMod { - public override string Name => "SettingsRedux"; - public override string Author => "XDelta"; - public override string Version => "1.1.0"; - public override string Link => "https://github.com/XDelta/SettingsRedux"; +namespace SettingsRedux; - [AutoRegisterConfigKey] - private static readonly ModConfigurationKey enableSettingReplacement = new ModConfigurationKey("enableSettingReplacement", "Replace default Neos settings page", () => true); +public class SettingsRedux : ResoniteMod { + public override string Name => "Settings Redux"; + public override string Author => "Delta"; + public override string Version => "2.0.0"; + public override string Link => "https://github.com/XDelta/SettingsRedux"; - [AutoRegisterConfigKey] - private static readonly ModConfigurationKey useLinearSliders = new ModConfigurationKey("useLinearSliders", "Use linear sliders", () => false); + [AutoRegisterConfigKey] + private static readonly ModConfigurationKey enableSettingReplacement = new("enableSettingReplacement", "Replace the default Resonite settings page", () => true); - private static ModConfiguration Config; + [AutoRegisterConfigKey] + private static readonly ModConfigurationKey useLinearSliders = new("useLinearSliders", "Use linear sliders instead of exponential ones (Requires changing tabs)", () => false); - public override void OnEngineInit() { - Config = GetConfiguration(); - Config.Save(true); - Harmony harmony = new Harmony("net.deltawolf.SettingsRedux"); - harmony.PatchAll(); - Config.OnThisConfigurationChanged += delegate { SettingsDialog_OnAttach_Patch.HideDefaultUi(); }; - } + private static ModConfiguration Config; - public enum Tabs { - Audio, - Controls, - Video, - Network, - Misc - } + public override void OnEngineInit() { + Config = GetConfiguration(); + Config.Save(true); + Harmony harmony = new("net.deltawolf.SettingsRedux"); + harmony.PatchAll(); + Config.OnThisConfigurationChanged += delegate { SettingsDialog_OnAttach_Patch.SetUIState(); }; + } - [HarmonyPatch(typeof(SettingsDialog), "OnAttach")] - class SettingsDialog_OnAttach_Patch { - - private static SettingsDialog settingsDialog; - private static SlideSwapRegion _slideSwap; - private static SyncRef> _heightField; - private static Sync _useImperial; - private static MethodInfo _OnSaveMethod; - - private static Tabs ActiveTab = Tabs.Audio; - private static AudioSettingSync audioSettingSync; - private static readonly float DefaultUiScale = 28f; - - //private static SyncRefList