Jump to content
UBot Underground

Adding Dropdown Selections For Parameters


Go to solution Solved by nichewebstrategies,

Recommended Posts

Hey

 

Ive just made my first plugin,I dont know practically any C#,just pasting bits I need together,have a beginner level understanding of javascript

 

Is their any code example of making a dropdown selection please?

 

this is from the Ubot site,which doesn't mean much to me,

thanks for any help

 

 

public UBotType Type { get; private set; }
/// <summary>
/// This can be used to define a list of values that the user can select from with a dropbox.
/// </summary>

 

 

Link to post
Share on other sites
  • Solution

It's pretty simple to do.

 

In the constructor of your plugin where you are defining your parameters, you will set the options of your dropdown like so:

_parameters.Add(new UBotParameterDefinition("My Awesome Parameter", UBotType.String));
_parameters[0].Options = new List<string> { "option 1", "option 2", "option 3" };

Hope this helps.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...