MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / prepareDraw

Function prepareDraw

src/OpenLoco/src/Ui/Windows/ProgressBar.cpp:90–98  ·  view source on GitHub ↗

0x004CF78A

Source from the content-addressed store, hash-verified

88
89 // 0x004CF78A
90 static void prepareDraw([[maybe_unused]] Window& self)
91 {
92 // Keep the window centered.
93 self.x = (Ui::width() / 2) - (self.width / 2);
94 self.y = std::max(28, (Ui::height() / 2) - (self.height / 2));
95
96 char* buffer = const_cast<char*>(StringManager::getString(StringIds::buffer_1250));
97 strncpy(buffer, _captionString.c_str(), 256);
98 }
99
100 // 004CF7A0
101 static void draw(Window& self, Gfx::DrawingContext& drawingCtx)

Callers

nothing calls this directly

Calls 3

widthFunction · 0.85
heightFunction · 0.85
getStringFunction · 0.85

Tested by

no test coverage detected