The line of one plugin in the plugin manager (fl_plugin_row): a switch that shows whether the plugin is saved as enabled and toggles it, the name of the plugin and its state in this session. Assign the plugin with set_plugin. The description, the dependencies and the dependents of the plugin are the tooltip of the row. Derives from fl_base_panel.

Summary

Methods

Returns the plugin this row stands for.
Init()client
Creates the switch and the labels for the name and the state of the plugin.
Draws the row through the theme's PaintRow hook, unless the active theme draws it in its PaintAdminRow hook.
Puts the switch on the left, the name after it and the state on the right.
Sets whether the row is drawn with a darker background, which the page does for every other row.
Sets the plugin this row stands for and fills in its name, state, switch and tooltip.
Asks the server to enable the plugin if it is saved as disabled, and to disable it otherwise.

Methods

Returns the plugin this row stands for.

Returns

  • Map plugin entry, or nil if it has not been set yet

Creates the switch and the labels for the name and the state of the plugin.

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

Parameters

  • w Number panel width
  • h Number panel height

PANEL:PerformLayout(w, h)

client plugins/admin/plugin/views/cl_plugins.lua:103

Puts the switch on the left, the name after it and the state on the right.

Parameters

  • w Number panel width
  • h Number panel height

PANEL:set_dark(dark)

client plugins/admin/plugin/views/cl_plugins.lua:123

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

Parameters

  • dark Boolean

PANEL:set_plugin(entry)

client plugins/admin/plugin/views/cl_plugins.lua:131

Sets the plugin this row stands for and fills in its name, state, switch and tooltip. The switch of the admin plugin itself is disabled, since the plugin manager is part of it.

Parameters

  • entry Map plugin entry as returned by Plugin.known

PANEL:toggle_plugin()

client plugins/admin/plugin/views/cl_plugins.lua:187

Asks the server to enable the plugin if it is saved as disabled, and to disable it otherwise. A plugin that the schema or other plugins depend on is only disabled after the player has confirmed a warning that names them, and is then disabled by force.

Defined in