| 91 | } |
| 92 | |
| 93 | void 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 | |
| 105 | void ScriptScreen::draw(void) const |
| 106 | { |