MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / RefreshHistory

Method RefreshHistory

SDK/src/NDK/Console.cpp:349–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347 */
348
349 void Console::RefreshHistory()
350 {
351 m_historyDrawer.Clear();
352 auto it = m_historyLines.end();
353 if (m_historyLines.size() > m_maxHistoryLines)
354 it -= m_maxHistoryLines;
355 else
356 it = m_historyLines.begin();
357
358 for (unsigned int i = 0; i < m_maxHistoryLines; ++i)
359 {
360 if (m_maxHistoryLines - i <= m_historyLines.size() && it != m_historyLines.end())
361 {
362 m_historyDrawer.AppendText(it->text);
363 ++it;
364 }
365
366 m_historyDrawer.AppendText(Nz::String('\n'));
367 }
368
369 m_historyTextSprite->Update(m_historyDrawer);
370 }
371}

Callers

nothing calls this directly

Calls 6

StringFunction · 0.50
ClearMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
AppendTextMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected