A row of the config editor: the name of a config value, markers for its flags, the control that matches its type (slider, checkbox, text entry, list editor or dropdown) and a button that resets it to its default. Changes are sent to the server.
Summary
Methods
Methods
Adds a small icon after the name of the config that marks one of its flags.
Parameters
- icon String FontAwesome icon ID
- tooltip String text shown when the icon is hovered
- on_click Function optional, defaults to
nilcalled without arguments when the icon is clicked
Returns
- Panel the created fl_button
Creates the control of the line anew and fills it with the value of the config. A static config and a private one that has not been revealed get a text that cannot be edited; any other config gets the control of its data type: a slider, a checkbox, a text entry, a list editor or a dropdown.
Returns the value the line shows: the pending value of a config that waits for a restart, the current value otherwise.
Returns
- Any
Creates the label that shows the config's name and the button that resets the config.
Lets the active theme draw the line through its PaintConfigLine hook.
Parameters
- w Number panel width
- h Number panel height
Positions the name, the flag markers after it, the reset button on the right and the control in the right half of the line.
Parameters
- w Number panel width
- h Number panel height
Binds the line to a config entry: shows its name, marks its flags (a lock for a static config, a clock for one that needs a restart, an eye that reveals the value of a private one) and creates the control for its data type.
Parameters
- key String config key
- config_table Map the config's menu entry (name, description, type, data)
Sends the value of the slider to the server half a second after it was last moved, once the player has let go of it.
Brings the line up to date with the config: shows its value in the control, unless the player is in the middle of editing it, and refreshes the marker of a config that needs a restart, which is highlighted while a value is waiting for the restart.