menus.esc module

Provides ESC Menu functionality.

Bases: menus.esc.PagedESCMenu

Creates a list-like ESC menu.

Navigation options are added automatically.

Initialize the object.

Parameters:

Bases: menus.esc.PagedESCOption

Provides options for ListESCMenu objects.

Initialize the option.

Parameters:

See menus.base._MenuData._render().

Bases: menus.esc.SimpleESCMenu, menus.base._PagedMenuBase

Create menus with an unlimited number of options.

Navigation options will be added automatically.

Initialize the object.

Parameters:

Prepare the body for the menu.

Parameters:
  • player_index (int) – A player index.
  • page (_PlayerPage) – The player’s current page.
  • data (KeyValues) – The current menu data.

Prepare the footer for the menu.

Parameters:
  • player_index (int) – A player index.
  • page (_PlayerPage) – The player’s current page.
  • data (KeyValues) – The current menu data.

Prepare the header for the menu.

Parameters:
  • player_index (int) – A player index.
  • page (_PlayerPage) – The player’s current page.
  • data (KeyValues) – The current menu data.

Return the maximum possible item count per page.

See menus.base._BaseMenu._get_menu_data().

See menus.base._BaseMenu._select().

Bases: menus.base._BaseOption

Display an enumerated option.

See menus.base._MenuData._render().

Bases: menus.base._BaseMenu

This class creates basic ESC menus.

Initialize the object.

Parameters:

See menus.base._BaseMenu._close().

Return all menu data as a keyvalues.KeyValues object.

Parameters:player_index (int) – See menus.base._BaseMenu._get_menu_data().

Return the queue for ESC menus.

See menus.base._BaseMenu._select().

Build and send the menu to the given player via create_message().

Parameters:player_index (int) – See menus.base._BaseMenu._send().

Bases: menus.base._BaseOption

Provides options for SimpleESCMenu objects.

Initialize the option.

Parameters:

See menus.base._MenuData._render().