
250 8. Text
//========================================================================
// Return console command
// Handles console single key commands
// Returns all other commands to game
//========================================================================
std::string Console::getCommand()
{
// If console not initialized or not visible
if (!initialized || !visible)
return "";
// Check for console key
if (input->wasKeyPressed(CONSOLE_KEY))
hide(); // Turn off console
// Check for Esc key
if (input->wasKeyPressed(ESC_KEY))
return "";
// Check for scroll
if (input->wasKeyPressed(VK_UP)) // If up arrow
scrollAmount++;
else if (input->wasKeyPressed(VK_DOWN)) ...