Calculates the amount of visible lines, based on the console size, excluding the input line.
| 408 | |
| 409 | // Calculates the amount of visible lines, based on the console size, excluding the input line. |
| 410 | int32_t InGameConsole::GetNumVisibleLines() const |
| 411 | { |
| 412 | const int32_t lineHeight = InGameConsoleGetLineHeight(); |
| 413 | const int32_t consoleHeight = _consoleBottomRight.y - _consoleTopLeft.y; |
| 414 | if (consoleHeight == 0) |
| 415 | return 0; |
| 416 | const int32_t drawableHeight = consoleHeight - 2 * lineHeight - 4; // input line, separator - padding |
| 417 | return drawableHeight / lineHeight; |
| 418 | } |
nothing calls this directly
no test coverage detected