| 68 | } |
| 69 | |
| 70 | void ScriptScreen::configureLogWidth(void) |
| 71 | { |
| 72 | const float advance = TextPool::get().monoAdvance(LOG_SIZE); |
| 73 | // SCROLLBAR_W keeps the longest line clear of the scrollbar track. |
| 74 | constexpr int SCROLLBAR_W = 8; |
| 75 | const int usable = ScriptTile::LOG_W - 2 * ScriptTile::LOG_PAD - SCROLLBAR_W; |
| 76 | if (advance > 0.0f) { |
| 77 | ScriptConsole::get().setWidth((size_t)(usable / advance)); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | void ScriptScreen::drawTop(void) const |
| 82 | { |
nothing calls this directly
no test coverage detected