The settings page of the tab menu (fl_settings): a scrollable list with a header for every category and an fl_setting_row for every setting that is visible to the player, and a button that sets all of them back to their defaults. rebuild recreates the list; the plugin calls update_setting when a value changes. Derives from fl_base_panel.

Summary

Methods

Returns the IDs of the listed settings as one string, which changes whenever a setting appears in the list, disappears from it or moves.
Returns the size the tab menu gives this panel when it opens it.
Init()client
Creates the scroll panel that holds the list and the button that resets the listed settings after a confirmation, and makes the panel known to the plugin.
Draws the card and the title of the menu, unless the active theme does that in its PaintSettingsMenu hook.
Keeps the list above the reset button, which stays in the bottom right corner.
rebuild()client
Recreates the list: a header for every category followed by the rows of its settings, or a notice if there is no setting to show.
Think()client
Rebuilds the list on the frame after the set of visible settings has changed.
Updates the menu after the value of a setting has changed: the row of the setting, or the whole list on the next frame if the change has made settings appear or disappear.

Methods

PANEL:get_listed(categories)

client plugins/settings/plugin/views/cl_settings.lua:85

Returns the IDs of the listed settings as one string, which changes whenever a setting appears in the list, disappears from it or moves.

Parameters

  • categories List<Map> categories returned by ClientSettings:get_categories

Returns

  • String

Returns the size the tab menu gives this panel when it opens it.

Returns

  • Number width
  • Number height

Creates the scroll panel that holds the list and the button that resets the listed settings after a confirmation, and makes the panel known to the plugin.

Draws the card and the title of the menu, unless the active theme does that in its PaintSettingsMenu hook.

Parameters

  • w Number panel width
  • h Number panel height

PANEL:PerformLayout(w, h)

client plugins/settings/plugin/views/cl_settings.lua:71

Keeps the list above the reset button, which stays in the bottom right corner.

Parameters

  • w Number panel width
  • h Number panel height

Recreates the list: a header for every category followed by the rows of its settings, or a notice if there is no setting to show.

Rebuilds the list on the frame after the set of visible settings has changed.

PANEL:update_setting(id)

client plugins/settings/plugin/views/cl_settings.lua:148

Updates the menu after the value of a setting has changed: the row of the setting, or the whole list on the next frame if the change has made settings appear or disappear.

Parameters

  • id String setting id

Defined in