Support_Prefs v3.1
DescriptionServer_Prefs replaces the default server settings GUI with this extensible one:


In addition to supporting many pref types, this new GUI also supports subcategories; instead of getting their own section, your mods get their own menu.
It also supports RTB prefs registered with RTB_RegisterPref, and icons - with more features to come.
DocumentationVery similar to RTB. To add a pref, do
registerPref(category,subcategory,title,type,variable,default,params,callback,legacy,private,hostonly);- Name names the pref.
- Category chooses what submenu it's in.
- Subcategory chooses what seperator it's under.
- Variable chooses what global represents it.
- Type chooses what the input box looks like with the same syntax as RTB's types, and %perams are the options for the type.
- "string" "[max]" is a string with a maximum length of [max].
- "int" "[min] [max]" is an intiger with a maximum of [max] and minimum of [min].
- "bool" "" is a checkbox.
- "list" "[option1name] [option1val] [option2name] [option2val] etc.." is a pop up menu with those options.
- "playerlist" "[min] [max]" is a convenience type that just displays 1 to [size] players in a pop up menu.
- "button" "" is a button that calls your callback when pressed.
- "wordlist" "[delimiter] [maxwords]" is a list of words.
- "BL_IDlist" "[delimiter] [maxids]" is a list of users.
- "datablocklist" "[delimiter] [maxdatablocks] [type]" is a list of datablocks. (note: not fully functional yet)
- "float" "[min] [max]" is a slider
- "num" "[min] [max]" is a decimal OR non decimal number in a box.
- "datablock" "[type]" is a data type
- Legacy is whether the var is from an old RTB mod. Should always be 0.
- Default is your variable's default value.
- IsHostOnly defines whether this option can be changed by anyone who can access the menu or just the host.
- Callback defines a function that will be called when your value is changed.
- Private defines whether the change can ever be displayed to the server (for passwords and such)
The old RTB_registerPref syntax works fine too but be aware you can't do as much with it.
For setting your category's icon, there's also:
registerPrefGroupIcon(category, icon);- Category defines your category's name again.
- icon defines what your icon is - select from the folder at Support_Prefs/client/prefmanager/resources/icons/*.
Remember to check that $BLPrefs::Version !$= "" before registering anything.
DownloadHere.Note: v2 and v3 are not compatible with each other as v3 uses the glass back end.