mirror of https://github.com/stella-emu/stella.git
fix #623 (Rom info too large)
This commit is contained in:
parent
21b4bc36fa
commit
89fd236c87
|
@ -94,9 +94,9 @@ class LauncherDialog : public Dialog
|
|||
|
||||
private:
|
||||
static constexpr int MIN_LAUNCHER_CHARS = 24;
|
||||
static constexpr int MIN_ROMINFO_CHARS = 24;
|
||||
static constexpr int MIN_ROMINFO_CHARS = 30;
|
||||
static constexpr int MIN_ROMINFO_ROWS = 7; // full lines
|
||||
static constexpr int MIN_ROMINFO_LINES = 2; // extra lines
|
||||
static constexpr int MIN_ROMINFO_LINES = 4; // extra lines
|
||||
|
||||
void center() override { positionAt(0); }
|
||||
void handleKeyDown(StellaKey key, StellaMod mod, bool repeated) override;
|
||||
|
|
|
@ -205,9 +205,14 @@ void RomInfoWidget::drawWidget(bool hilite)
|
|||
int xpos = _x + 8, ypos = _y + yoff + 5;
|
||||
for(const auto& info : myRomInfo)
|
||||
{
|
||||
|
||||
|
||||
|
||||
int lines = s.drawString(_font, info, xpos, ypos, _w - 16, _font.getFontHeight() * 3,
|
||||
onTop ? _textcolor : _shadowcolor);
|
||||
if(ypos >= _h) break;
|
||||
ypos += _font.getLineHeight() + (lines - 1) * _font.getFontHeight();
|
||||
// assume 2 lines for next entry
|
||||
if(ypos >= _h + _y - _font.getLineHeight() - _font.getFontHeight())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue