Closed JoewAlabel closed 1 year ago
1 - If you want to change acceptable values at runtime then you can't use an enum. You have to use string
as setting type and add AcceptableValueList<string>
to its description. Whenever you want to change the acceptable values you have to tell ConfigurationManager to reload the settings list by calling ConfigurationManager.BuildSettingList
.
2 - You can't control the collapsed state from the plugin, it's up to the user to collapse / expand one or all settings. This is because once there are more than a couple of plugins it makes it hard to find the setting you want.
1 - If you want to change acceptable values at runtime then you can't use an enum. You have to use
string
as setting type and addAcceptableValueList<string>
to its description. Whenever you want to change the acceptable values you have to tell ConfigurationManager to reload the settings list by callingConfigurationManager.BuildSettingList
.2 - You can't control the collapsed state from the plugin, it's up to the user to collapse / expand one or all settings. This is because once there are more than a couple of plugins it makes it hard to find the setting you want.
Thank you very much for all the support ;)
Hi! I have only those 2 question to finally releases my mod :D
1- Drop-Down List: I used enum to create the list, and used System.ComponentModel.DescriptionAttribute to my enum's items to override their displayed names. But I can not change the enum at Runtime.
So can you show me one example how can I use one Dictionary<string, string> with first string as the KEY (like as the enum value) and the second string in dic be the description to show up on drop down, please?
Like as, My Enum:
To the Dictionary:
Or one example on how to use this Dictionary with
AcceptableValueList
, please!My Bind:
2- Display all options by Default: After I press F1, i saw on the GUI the name of my plugin and three period (dots), so I have to click on it to show up all the config options: Screen Shot
How I make it to default shows up all configs, please? This way the users do not need to do the first click to show the options ;)
Btw, thank you very much for all support and help!!!!