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

Method configureLogWidth

switch/source/ScriptScreen.cpp:93–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void ScriptScreen::configureLogWidth(void)
94{
95 u32 advance = 0;
96 Gfx::GetTextDimensions(ScriptTile::LOG_SIZE, "0", &advance, NULL, FontFamily::Mono);
97 const int usable = ScriptTile::LOG_W - 2 * ScriptTile::PAD - SCROLLBAR_W;
98 // The tile is now the whole screen, so a row holds well over a hundred
99 // columns; ScriptConsole clamps to its own sane maximum.
100 if (advance > 0) {
101 ScriptConsole::get().setWidth((size_t)(usable / (int)advance));
102 }
103}
104
105void ScriptScreen::draw(void) const
106{

Callers

nothing calls this directly

Calls 2

getFunction · 0.85
setWidthMethod · 0.80

Tested by

no test coverage detected