Fixed rare crash when pressing start in GuiSettings to close windows.

Changed scraping complete message a bit.
Made spacing in GuiMsgBox better when there are multiple lines.
This commit is contained in:
Aloshi 2014-05-01 11:37:40 -05:00
parent 78a3f94e1e
commit fd5508a749
3 changed files with 9 additions and 5 deletions

View file

@ -55,7 +55,7 @@ GuiMsgBox::GuiMsgBox(Window* window, const std::string& text,
// now that we know width, we can find height
mMsg->setSize(width, 0); // mMsg->getSize.y() now returns the proper length
const float msgHeight = std::max(Font::get(FONT_SIZE_LARGE)->getHeight(), mMsg->getSize().y());
const float msgHeight = std::max(Font::get(FONT_SIZE_LARGE)->getHeight(), mMsg->getSize().y()*1.225f);
setSize(width + HORIZONTAL_PADDING_PX*2, msgHeight + mButtonGrid->getSize().y());
// center for good measure

View file

@ -122,11 +122,14 @@ void GuiScraperMulti::finish()
{
std::stringstream ss;
if(mTotalSuccessful == 0)
ss << "NO GAMES SUCCESSFULLY SCRAPED.";
else
{
ss << "NO GAMES WERE SCRAPED.";
}else{
ss << mTotalSuccessful << " GAME" << ((mTotalSuccessful > 1) ? "S" : "") << " SUCCESSFULLY SCRAPED!";
if(mTotalSkipped > 0)
ss << "\n" << mTotalSkipped << " GAME" << ((mTotalSkipped > 1) ? "S" : "") << " SKIPPED.";
}
mWindow->pushGui(new GuiMsgBox(mWindow, ss.str(),
"OK", [&] { delete this; }));

View file

@ -42,6 +42,7 @@ bool GuiSettings::input(InputConfig* config, Input input)
Window* window = mWindow;
while(window->peekGui() && window->peekGui() != window->getViewController())
delete window->peekGui();
return true;
}
return GuiComponent::input(config, input);