SourceMod SDK  1.7
SourceMod::IRootConsole Class Referenceabstract

Manages the root console menu - the "sm" command for servers. More...

#include <public/IRootConsoleMenu.h>

Inheritance diagram for SourceMod::IRootConsole:
SourceMod::SMInterface

Public Member Functions

virtual bool AddRootConsoleCommand (const char *cmd, const char *text, IRootConsoleCommand *pHandler)=0
 Adds a root console command handler. The command must be unique. More...
 
virtual bool RemoveRootConsoleCommand (const char *cmd, IRootConsoleCommand *pHandler)=0
 Removes a root console command handler. More...
 
virtual void ConsolePrint (const char *fmt,...)=0
 Prints text back to the console. More...
 
virtual void DrawGenericOption (const char *cmd, const char *text)=0
 Draws a generic command/description pair. NOTE: The pair is currently four spaces indented and 16-N spaces of separation, N being the length of the command name. This is subject to change in case we account for Valve's font choices. More...
 
virtual bool AddRootConsoleCommand2 (const char *cmd, const char *text, IRootConsoleCommand *pHandler)=0
 Adds a root console command handler. The command must be unique. More...
 
- Public Member Functions inherited from SourceMod::SMInterface
virtual unsigned int GetInterfaceVersion ()=0
 Must return an integer defining the interface's version.
 
virtual const char * GetInterfaceName ()=0
 Must return a string defining the interface's unique name.
 
virtual bool IsVersionCompatible (unsigned int version)
 Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning. More...
 

Detailed Description

Manages the root console menu - the "sm" command for servers.

Member Function Documentation

virtual bool SourceMod::IRootConsole::AddRootConsoleCommand ( const char *  cmd,
const char *  text,
IRootConsoleCommand pHandler 
)
pure virtual

Adds a root console command handler. The command must be unique.

Parameters
cmdString containing the console command.
textDescription text.
pHandlerAn IRootConsoleCommand pointer to handle the command.
Returns
True on success, false on too many commands or duplicate command.
virtual bool SourceMod::IRootConsole::AddRootConsoleCommand2 ( const char *  cmd,
const char *  text,
IRootConsoleCommand pHandler 
)
pure virtual

Adds a root console command handler. The command must be unique.

This version of the function uses the OnRootConsoleCommand2 callback.

Parameters
cmdString containing the console command.
textDescription text.
pHandlerAn IRootConsoleCommand pointer to handle the command.
Returns
True on success, false on too many commands or duplicate command.
virtual void SourceMod::IRootConsole::ConsolePrint ( const char *  fmt,
  ... 
)
pure virtual

Prints text back to the console.

Parameters
fmtFormat of string.
...Format arguments.
virtual void SourceMod::IRootConsole::DrawGenericOption ( const char *  cmd,
const char *  text 
)
pure virtual

Draws a generic command/description pair. NOTE: The pair is currently four spaces indented and 16-N spaces of separation, N being the length of the command name. This is subject to change in case we account for Valve's font choices.

Parameters
cmdString containing the command option.
textString containing the command description.
virtual bool SourceMod::IRootConsole::RemoveRootConsoleCommand ( const char *  cmd,
IRootConsoleCommand pHandler 
)
pure virtual

Removes a root console command handler.

Parameters
cmdString containing the console command.
pHandlerAn IRootConsoleCommand pointer for verification.
Returns
True on success, false otherwise.

The documentation for this class was generated from the following file: