Releases: badhaloninja/ResoniteModSettings
Releases · badhaloninja/ResoniteModSettings
v2.3.0
v2.2.2
v2.2.1
Rebuild against 2025.2.18.3 due to ValueReceiver being moved to FrooxEngine.UIX.* from FrooxEngine.* in 2025.2.17.1301
v2.2.0
- Implement custom UI by @art0007i in #7
- Changed
ConfigElementslot names to the configuration key name,{ModName}.{key.Name}
From @art0007i
How to use for people who want to add custom ui in their mod:
- Make your mod a partial class.
- Add ModSettingsStub.cs to your project, and change the namespace and classname to match your mod.
- Write code inside the ModSettings_BuildModUi function
ModSettingsStub.cs
using Elements.Core;
using FrooxEngine;
using FrooxEngine.UIX;
using ResoniteModLoader;
using System;
namespace ExampleMod
{
public partial class ExampleMod
{
/// <summary>
/// Gives you a UIBuilder which allows you to create custom ui within your page.<br/>
/// It's setup with default RadiantUI styles (<see cref=\"RadiantUI_Constants.SetupDefaultStyle\"/>)<br/>
/// The PreferredHeight is set to <see cref=\"ModSettings_GetHeight\"/>, please respect this value when building your UI.<br/>
/// The UI builder is located within a VerticalLayout with a spacing of 4 with ForceExpandWidth set to true.<br/>
/// The vertical layout also has a ContentSizeFitter with VerticalFit set to PreferredSize
/// </summary>
/// <param name=\"ui\"></param>
public void ModSettings_BuildModUi(UIBuilder ui)
{
ui.Button(\"hi\");
ModSettings_BuildDefaultFields(this, ui);
ui.Button(\"hello\");
}
/// <summary>
/// Gets the height that a single config item should be in your settings page.<br/>
/// This value can be changed on a per user basis in the ModSettings config.
/// </summary>
/// <returns></returns>
public static float ModSettings_GetHeight()
{
throw new NotImplementedException(\"It's a stub.\");
}
/// <summary>
/// Gets the color that every other item should have, null if items shouldn't be highlighted.
/// </summary>
public static colorX? ModSettings_GetHighlightColor()
{
throw new NotImplementedException(\"It's a stub.\");
}
/// <summary>
/// Builds all of the fields present in the config menu by default.<br/>
/// Use this method when you want to add something to the page before/after the default UI.
/// </summary>
public static void ModSettings_BuildDefaultFields(ResoniteModBase mod, UIBuilder ui)
{
throw new NotImplementedException(\"It's a stub.\");
}
/// <summary>
/// Builds a singular field using the provided <see cref=\"ModConfigurationKey\"/><br/>
/// When building multiple fields you are expected to add a highlight to every other field with the color obtained using <see cref=\"ModSettings_GetHighlightColor\"/><br/>
/// If the highlight color is null then you don't have to add highlighting
/// </summary>
public static Slot ModSettings_BuildDefaultField(ResoniteModBase mod, UIBuilder ui, ModConfigurationKey key)
{
throw new NotImplementedException(\"It's a stub.\");
}
}
}You can also refer to ModSettingsCustomUITest to see an example of adding buttons to the config UI
v2.1.8
- Rebuild for CommonToolExtensions being renamed to InteractionHandlerExtensions
v2.1.7
2024.9.4.357
- Resolve ambiguous match for
RadiantDashScreen.BuildBackgroundmethod
v2.1.6
Hotfix for the new type update
- Handle new
DynamicVariableWriteResult - Fix new ambiguous method call when building
- Rebuild for compatibility
v2.1.5
- Rebuild against Resonite Beta 2024.5.29.130 for compatibility
- Added support for the inspector field action buttons when in VR
- I made the buttons disabled in desktop due to issues with the context menu locking the user's view in place
v2.1.4
There's nothing new in this version
This is just a rebuild against Resonite Beta 2024.4.15.1407 for compatibility
v2.1.3
Initial release for the Resonite Mod Manifest
- Updated harmony ID to
ninja.badhalo.ModSettings - Cleaned up build files