\n\n's no more break.

This commit is contained in:
StackZ
2020-12-21 11:00:31 +01:00
parent a82491a63d
commit 07577b0fe2
3 changed files with 3 additions and 30 deletions
+1 -10
View File
@@ -45,16 +45,7 @@ void StoreUtils::DrawEntryInfo(const std::unique_ptr<Store> &store, const std::u
Gui::DrawStringCentered(25, 0, 0.6, TEXT_COLOR, entry->GetTitle(), 265, 0, font);
Gui::DrawStringCentered(25, 20, 0.4, TEXT_COLOR, entry->GetAuthor(), 265, 0, font);
if (entry->GetDescription() != "") {
/* "\n\n" breaks C2D_WordWrap, so check here. */
if (!(entry->GetDescription().find("\n\n") != std::string::npos)) {
Gui::DrawStringCentered(25, 50, 0.4, TEXT_COLOR, entry->GetDescription(), 240, 0, font, C2D_WordWrap);
} else {
Gui::DrawStringCentered(25, 50, 0.4, TEXT_COLOR, entry->GetDescription(), 240, 0, font);
}
}
Gui::DrawStringCentered(25, 50, 0.4, TEXT_COLOR, entry->GetDescription(), 240, 0, font, C2D_WordWrap);
Gui::DrawString(61, 130, 0.45, TEXT_COLOR, Lang::get("VERSION") + ": " + entry->GetVersion(), 240, 0, font);
Gui::DrawString(61, 145, 0.45, TEXT_COLOR, Lang::get("CATEGORY") + ": " + entry->GetCategory(), 240, 0, font);