MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / scrollLines

Method scrollLines

common/script/scriptlogview.cpp:50–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void 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
59void ScriptLogView::scrollPages(int pages)
60{

Callers 2

mainFunction · 0.80
mainFunction · 0.80

Calls 2

getFunction · 0.85
lineCountMethod · 0.80

Tested by

no test coverage detected