MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / Scroll

Method Scroll

src/openrct2-ui/interface/InGameConsole.cpp:177–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177void InGameConsole::Scroll(int32_t linesToScroll)
178{
179 const int32_t maxVisibleLines = GetNumVisibleLines();
180 const int32_t numLines = static_cast<int32_t>(_consoleLines.size());
181 if (numLines > maxVisibleLines)
182 {
183 int32_t maxScrollValue = numLines - maxVisibleLines;
184 _consoleScrollPos = std::clamp<int32_t>(_consoleScrollPos - linesToScroll, 0, maxScrollValue);
185 }
186}
187
188void InGameConsole::Clear()
189{

Callers 1

ProcessMessagesFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected