| 48 | } |
| 49 | |
| 50 | void ScriptLogView::scrollLines(int lines) |
| 51 | { |
| 52 | // The furthest back the pane can go is the oldest line the console still |
| 53 | // holds sitting on the top row. |
| 54 | const int total = (int)ScriptConsole::get().lineCount(); |
| 55 | const int maxBack = std::max(0, total - mViewport); |
| 56 | mScrollBack = std::clamp(mScrollBack + lines, 0, maxBack); |
| 57 | } |
| 58 | |
| 59 | void ScriptLogView::scrollPages(int pages) |
| 60 | { |