This commit is contained in:
NotAKidoS 2024-01-03 01:50:40 -06:00
parent 21f8893095
commit a92e478eb9
22 changed files with 2 additions and 80 deletions

View file

@ -0,0 +1,33 @@
using MelonLoader;
namespace NAK.MenuScalePatch;
public class MenuScalePatch : MelonMod
{
public static MelonPreferences_Category Category =
MelonPreferences.CreateCategory(nameof(MenuScalePatch));
public static MelonPreferences_Entry<bool> EntryUseIndependentHeadTurn =
Category.CreateEntry<bool>("Use Independent Head Turn", true, description: "Should you be able to use independent head turn in a menu while in Desktop?");
public static MelonPreferences_Entry<bool> EntryPlayerAnchorMenus =
Category.CreateEntry<bool>("Player Anchor Menus", true, description: "Should the menus be anchored to & constantly follow the player?");
public static MelonPreferences_Entry<bool> EntryUseFOVAdjustment =
Category.CreateEntry<bool>("Use FOV Adjustment", true, description: "Should the menus adjust to your changed FOV?");
public override void OnInitializeMelon()
{
foreach (var setting in Category.Entries)
{
setting.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
}
}
internal static void UpdateSettings()
{
Helpers.MSP_MenuInfo.UseIndependentHeadTurn = EntryUseIndependentHeadTurn.Value;
Helpers.MSP_MenuInfo.PlayerAnchorMenus = EntryPlayerAnchorMenus.Value;
}
private static void OnUpdateSettings(object arg1, object arg2) => UpdateSettings();
}