I am planning on implementing this myself
No
Describe your request
Creating lots of similar CreateXYZEntry methods for mod settings (to facilitate eg. custom input types) sucks, and modifying the settings' TextMenu after Everest has already created it also sucks. I propose there should be a way for mods to create their own [SettingsXYZ]-like attributes to avoid repetition in cases like these, for example:
[SettingInGame(false)]
[SettingFactory(CreateColorSetting, 1f, 1f, 1f)]
public Color MyColorSetting {get; set;} = Color.Red;
public TextMenu.Item CreateColorSetting(PropertyInfo propertyInfo, object?[] parameters)
{
if (propertyInfo.PropertyType is not typeof(Color)) return;
float rRange = (parameters[0] as float) ?? 0f, gRange = (parameters[1] as float) ?? 0f, bRange = (parameters[2] as float) ?? 0f;
// ...
}
(this is very tentative - I have no clue how this API should be best designed; the signature of the factory method should probably be closer to that of the CreateXYZEntry methods I think)
Additional context
No response
I am planning on implementing this myself
No
Describe your request
Creating lots of similar
CreateXYZEntrymethods for mod settings (to facilitate eg. custom input types) sucks, and modifying the settings'TextMenuafter Everest has already created it also sucks. I propose there should be a way for mods to create their own[SettingsXYZ]-like attributes to avoid repetition in cases like these, for example:(this is very tentative - I have no clue how this API should be best designed; the signature of the factory method should probably be closer to that of the
CreateXYZEntrymethods I think)Additional context
No response