The line of one setting in the settings menu (fl_setting_row): the name of the setting, the control its type creates for it and a button that sets it back to its default. Assign the setting with set_setting. The description of the setting is the tooltip of the row. Derives from fl_base_panel.

Summary

Methods

Creates the control of the setting anew through the type of the setting, showing the current value, and updates the reset button.
Returns the setting this row edits.
Init()client
Creates the label of the setting and the button that resets it.
Draws the row through the theme's PaintRow hook, unless the active theme draws it in its PaintSettingRow hook.
Puts the label on the left, the reset button on the right and the control of the setting between the middle of the row and the reset button.
Sets whether the row is drawn with a darker background, which the menu does for every other row.
Sets the setting this row edits and creates the control for it.
update()client
Brings the row up to date with the value of its setting: recreates the control if the value was not changed through it, and enables the reset button unless the setting is at its default.

Methods

Creates the control of the setting anew through the type of the setting, showing the current value, and updates the reset button.

Returns the setting this row edits.

Returns

  • Map setting definition, or nil if it has not been set yet

Creates the label of the setting and the button that resets it.

Draws the row through the theme's PaintRow hook, unless the active theme draws it in its PaintSettingRow hook.

Parameters

  • w Number panel width
  • h Number panel height

PANEL:PerformLayout(w, h)

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

Puts the label on the left, the reset button on the right and the control of the setting between the middle of the row and the reset button.

Parameters

  • w Number panel width
  • h Number panel height

Sets whether the row is drawn with a darker background, which the menu does for every other row.

Parameters

  • dark Boolean

PANEL:set_setting(setting)

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

Sets the setting this row edits and creates the control for it.

Parameters

  • setting Map setting definition

Brings the row up to date with the value of its setting: recreates the control if the value was not changed through it, and enables the reset button unless the setting is at its default.

Defined in