settings.types module

Contains user setting types.

class settings.types.BoolSetting(name, default, text=None)[source]

Bases: settings.types.SettingsType

Class used to store boolean value settings.

__init__(name, default, text=None)[source]
class settings.types.IntegerSetting(name, default, text=None, min_value=None, max_value=None)[source]

Bases: settings.types.SettingsType

Class used to store integer value settings.

__init__(name, default, text=None, min_value=None, max_value=None)[source]

Store the base attributes on instantiation.

class settings.types.SettingsType(name, default, text=None)[source]

Bases: object

Class used to store settings with possible values.

__init__(name, default, text=None)[source]

Store the base attributes and create the menu.

get_setting(index)[source]

Return the setting value for the given player index.

convar

Return the convar name of the setting.

Return type:str
prefix = ''
class settings.types.StringSetting(name, default, text=None)[source]

Bases: settings.types.SettingsType

Class used to store string value settings with available options.

__init__(name, default, text=None)[source]

Store the base attributes on instatiation.

add_option(name, text=None)[source]

Add an option to the setting’s dictionary.

remove_option(name)[source]

Remove an option from the settings.