CHANGELOG

New in 0.9.0

New Feature: Reactivity Update! UI Framework can now refresh without the user having to press save or manually reloading the tab
New Feature: Update UI with current values. UI now refreshes when an entry value for a preference changes
New Feature: IsHidden support for categories UI Framework will now appropriately not show categories with the IsHidden property set to true.
New Feature: Modders can now implement an UserEditNotifier validator class. This can notify you when the user has edited their entry even when it hasn't been applied to their saved value yet.

Combined with the previous new feature, you can now adjust your UI according to your users' inputs

The following example uses it to change the visibility of certain categories based on user input without them having to hit save

//Create a method you can pass as a delegate
internal static void UpdateCategoryVis(object newValue)
{
    Experimental.IsHidden = !(bool)newValue;
    TestBooleans.IsHidden = !(bool)newValue;
    TestEmptyDisplayName.IsHidden = !(bool)newValue;
}

Create a new instance of UserEditNotifier and set this as the action for OnUserEdit

EnableDebugMode = CatUIFramework.CreateEntry("EnableDebugMode", false, "Enable Debug Logs", "Enables or disables debug logs for UIFramework.", false, false, new UserEditNotifier { OnUserEdit = UpdateCategoryVis });
New Feature: Modders can now request the window to refresh its UI.

Just call UI.RequestRefresh(modInstance)

New Feature: Dynamic dropdown support UI Framework now supports custom dropdown contents, not just from enums.

Create an items list

// It takes a list of DropdownItems which take a string as a display name, and a value of type object 
List<DropdownItem> itemList = new();

Create an instance of the DynamicDropdownDescriptor class passing the item list as a parameter in the constructor

public static DynamicDropdownDescriptor DropdownDescriptor = new(itemList);

Add items with

DropdownDescriptor.AddDropdownItem(new DropdownItem("Display Name", value)); 

or declare a list separately and set it with SetDropdownItems

Pass it into the CreateEntry validator parameter

DropdownTest = Category.CreateEntry("DropdownTest", -1, "Dropdown Test", "Dynamic dropdown test.", false, false, DropdownDescriptor);
Bug Fix: Added Flatland support UI Framework now works in Flatland

New in 0.8.2

just some backend stuff Don't worry about it

New in 0.8.1

New Feature: Draggable UI Window!

The UI window is now draggable by the title bar.

Bug Fix: Empty string display name support Buttons with empty display names will not show "Placeholder xxxx" anymore. This also applies to entries in general. Only for empty strings though. If you pass null, it will show placeholder again.
Feature change: VR toggle behavior now follows ModUI

If ModUI is enabled, and it has the VR Menu Toggle setting enabled, UI Framework will follow ModUI's visibility. If ModUI is visible (when the VR toggle is pressed), UI Framework will also be visible and vice versa. If you don't have ModUI or the setting is off, UI Framework will toggle normally with the VR toggle.

The toggle with VR buttons preference is also no longer a thing. A new preference is added for toggling with VR, keyboard, or both.

Backend enhancements just that lol

New in 0.8.0

Modders read this first one

New Feature: Improved MelonPreferences_Entry.Value Behavior

The Value property for entries won't update anymore until the save button is clicked. If you need to access the new value before it's been saved, you can get the EditedValue property instead.

New Feature: Expanded Type Support

Serialization and parsing is now handled by Tomlet. Anything Tomlet supports is now technically supported by UIFramework.

More details in the Type Support section

New feature: Custom display name attribute

Just add [assembly: UIInfo("My Mod's Better\nDisplay Name")] to your assembly attributes to display your mod's name differently on its button in UI Framework. Yes, it supports line breaks

New Feature: Support IsHidden property for entries.

Entries with IsHidden set to true won't be listed in the preferences list anymore.

New Feature: New Validator Extension System.

I came up with a system to use MelonLoader's custom validator feature to add extra UI configurations for entries. The new sliders and buttons feature are implemented through this system.

New Feature: Sliders! (and maybe more eventually 👀)

Modders can now implement sliders for numeric vlaues.

MySlider = Category.CreateEntry("MySlider", 0.5f, "My Slider", "Float Slider",false, false, new SliderDescriptor { Min = 0, Max = 1, DecimalPlaces = 3 });
New Feature: Add Buttons to the Entry List

Modders can now add their own buttons as entries into UI Framework.

UI.CreateButtonEntry(MelonPreferences_Category category, string buttonText, string displayName, string description, Action handler)

Go to Buttons for more details.

Bug Fix: Fixed issue with UI Framework *displaying* ModUI's window instead of hiding

whoops

Bug Fix: Finally suppressed saved and loaded message from MelonPreferneces

I somehow missed an entire boolean. Sorry Ulvak.

*This will only affect messages when you save or load through UI Framework. It will not suppress messages from melonloader itself when the game starts or closes.

New in 0.7.1

New setting: VR Toggle Toggle UI Framework window using your controllers by pressing both grips on both hands and pressing both primary buttons on both hands (X and A)
New setting: Force Hide ModUI Never leave ModUI accidentally open again. Enabling this setting will make UI Framework hide the ModUI window when UI Framework hides. This setting does not support the inactivity timer if ModUI is open by itself but does support hide on scene load
Bug fix: (hopefully) Fix layout quirks involving scroll views Hopefully, this fixes the issue with tabs all being squished to one side or only half showing.

New in 0.6.2

New Feature: Plugin support I just completely forgot about those.

I did have to change the .Register() function's signature. Right now, I have an overload for the old function for backwards compatibility. More details at the bottom of the page

New Feature: Exposed UI.IsVisible Property Your mod can now check if UIFramework is currently open.

Version 0.6.1

New Feature: Exposed OnModSaved event for modders

You can now subscribe to the OnModSaved event that triggers when the saved button is clicked while your mod is selected. This is an alternative for OnPreferencesSaved from MelonPreferences which gets called per category. This one is called once and only if your mod is selected.

UI.Register(this, OBSAutoRecorderSettings, TestCategory1, TestCategory2...).OnModSaved += MyModSaved;
Bug Fix: Increased Supported Mod Name Length Longer mod names can now fit into the mod list

*btw while text wrapping is disabled in mod list buttons, your MelonInfo name property does support spaces and line breaks that you can add manually if your mod name is still too long to fit into one line

Bug Fix: Fixed bug that called the selected category save action twice

Version 0.6.0

New Feature: Hide UI on inactivity Added settings to hide the UI after a certain amount of inactivity with keyboard and mouse.

Comes with new settings:

  • Auto Hide on Inactivity
  • Inactivity Timeout
New Feature: Remembers last category opened for each mod Moving between mods will now show the last category you were on for that mod. Will default to the first category. No more having to select the same category again when switching between mods.
New Feature: Selection highlighting Selected mods and categories will now be colored in the UI.

Version 0.5.1

New Feature: Non-contiguous enum support You can now use enum types that are non-sequential and non-zero-based for your dropdowns
New Feature: Discard button

Made discard button visible to load the saved values from the preferences file

Version 0.5.0

  • Added support for enum display names
  • Save button now saves the entire mod, not just the selected tab

Version 0.4.0

  • Created