LoadTopMenuConfig

Last Updated2007-09-26
Created At2007-09-26

Re-sorts the items in a TopMenu via a configuration file. The format of the configuration file should be a Valve Key-Values formatted file that SourceMod can parse. There should be one root section, and one sub-section for each category. Each sub-section's name should match the category name. Each sub-section may only contain key/value pairs in the form of: key: "item" value: Name of the item as passed to AddToTopMenu(). The TopMenu will draw items in the order declared in the configuration file. If items do not appear in the configuration file, they are sorted per-player based on how the handler function renders for that player. These items appear after the configuration sorted items.

native bool LoadTopMenuConfig(Handle topmenu, const char[] file, char[] error, int maxlength)

Parameters

Handle topmenu
TopMenu Handle.
const char[] file
File path.
char[] error
Error buffer.
int maxlength
Maximum size of the error buffer. Error buffer will be filled with a zero-terminated string if false is returned.

Return Value

bool True on success, false on failure.

Error

Invalid TopMenu Handle.