mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
39 lines
No EOL
1.3 KiB
C#
39 lines
No EOL
1.3 KiB
C#
using MelonLoader;
|
|
|
|
namespace NAK.AvatarScaleMod;
|
|
|
|
// i like this
|
|
|
|
internal static class ModSettings
|
|
{
|
|
public static readonly MelonPreferences_Category Category =
|
|
MelonPreferences.CreateCategory(nameof(AvatarScaleMod));
|
|
|
|
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
|
Category.CreateEntry("Enabled", true, description: "Toggle AvatarScaleMod entirely for Local user. Kinda.");
|
|
|
|
public static readonly MelonPreferences_Entry<bool> EntryUseScaleGesture =
|
|
Category.CreateEntry("Scale Gesture", false, description: "Use two fists to scale yourself easily.");
|
|
|
|
static ModSettings()
|
|
{
|
|
EntryEnabled.OnEntryValueChanged.Subscribe(OnEntryEnabledChanged);
|
|
EntryUseScaleGesture.OnEntryValueChanged.Subscribe(OnEntryUseScaleGestureChanged);
|
|
}
|
|
|
|
public static void InitializeModSettings()
|
|
{
|
|
AvatarScaleManager.GlobalEnabled = EntryEnabled.Value;
|
|
AvatarScaleGesture.GestureEnabled = EntryUseScaleGesture.Value;
|
|
}
|
|
|
|
private static void OnEntryEnabledChanged(bool oldValue, bool newValue)
|
|
{
|
|
AvatarScaleManager.GlobalEnabled = newValue;
|
|
}
|
|
|
|
private static void OnEntryUseScaleGestureChanged(bool oldValue, bool newValue)
|
|
{
|
|
AvatarScaleGesture.GestureEnabled = newValue;
|
|
}
|
|
} |