MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnInit

Method OnInit

src/textfile_gui.cpp:602–614  ·  view source on GitHub ↗

virtual */

Source from the content-addressed store, hash-verified

600}
601
602/* virtual */ void TextfileWindow::OnInit()
603{
604 /* If font has changed we need to recalculate the maximum width. */
605 this->num_lines = 0;
606 this->max_width = 0;
607 for (auto &line : this->lines) {
608 line.max_width = -1;
609 line.num_lines = 1;
610 line.wrapped_width = 0;
611 }
612
613 this->ReflowContent();
614}
615
616/* virtual */ void TextfileWindow::OnInvalidateData([[maybe_unused]] int data, [[maybe_unused]] bool gui_scope)
617{

Callers

nothing calls this directly

Calls 1

ReflowContentMethod · 0.95

Tested by

no test coverage detected