You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like currently, the plugin developers must manually tell the users in a README which settings are available for the plugin, and users have to modify a config file.
I propose to add in IViewer an optional property to implement that gives information about all the available settings for the plugin.
Example:
In IViewer.cs:
/// <summary>/// Get metadata about the settings available for this plugin./// This is used by the settings UI to display and manage plugin-specific settings./// </summary>/// <returns>An array of setting metadata objects describing each available setting</returns>PluginSettingMetadata[]GetSettings()=>[];
publicclassPluginSettingMetadata{publicstringSettingId{get;set;}publicstringDisplayName{get;set;}publicstringDescription{get;set;}publicTypeSettingType{get;set;}publicobjectDefaultValue{get;set;}publicobject[]PossibleValues{get;set;}// Optional: for settings that have a fixed set of possible values}
However, there seems to be a problem that we can't specify optional implementations. The code editor will give an error:
Target runtime doesn't support default interface implementation.
I believe we would have to upgrade to .NET 5, or figure out a workaround.
If implemented, this would enable the creation of a user-friendly settings interface. It could display the installed plugins, allowing you to click on one to easily view and modify all its available settings.
The text was updated successfully, but these errors were encountered:
Your idea should be similar to CurvaLauncher settings page.
Welcome PR, but please continue to use net462 and are not considering upgrading to .NET5+ at the moment, which will directly break a lot of dependencies of plugins.
If you have any ideas on the cleanest workaround to making it an optional property, please let me know. It cannot be required because I believe it will break plugins that aren't updated to implement it.
It looks like currently, the plugin developers must manually tell the users in a README which settings are available for the plugin, and users have to modify a config file.
I propose to add in
IViewer
an optional property to implement that gives information about all the available settings for the plugin.Example:
In
IViewer.cs
:However, there seems to be a problem that we can't specify optional implementations. The code editor will give an error:
I believe we would have to upgrade to
.NET 5
, or figure out a workaround.If implemented, this would enable the creation of a user-friendly settings interface. It could display the installed plugins, allowing you to click on one to easily view and modify all its available settings.
The text was updated successfully, but these errors were encountered: