C4 Engine
C4 Engine API Documentation

InputMgr::GetConsoleCallback

Defined in:  C4Input.h
Returns the callback function that is invoked when the console key is pressed.
Prototype

InputMgr::KeyCallback *GetConsoleCallback(voidconst;

Description
The GetConsoleCallback function returns a pointer to the function that is called whenever the console key is pressed and the keyboard is in game input mode. By default, the engine installs a console callback function that opens the built-in console window.

The KeyCallback type is defined as follows.

typedef void KeyCallback(void *);

The GetConsoleCallback function is normally used to save the current console callback function before it is changed or set to nullptr with the InputMgr::SetConsoleCallback function. In this case, the InputMgr::GetConsoleCookie function should also be called to save the current cookie value expected by the console callback function. These two values can be passed to the SetConsoleCallback at a later time to restore the previously installed callback function.
See Also

InputMgr::GetConsoleCookie

InputMgr::SetConsoleCallback

InputMgr::GetEscapeCallback

InputMgr::GetEscapeCookie

InputMgr::SetEscapeCallback