From 07577b0fe24e4ceb80833b782952f581fe01bad8 Mon Sep 17 00:00:00 2001 From: StackZ <47382115+SuperSaiyajinStackZ@users.noreply.github.com> Date: Mon, 21 Dec 2020 11:00:31 +0100 Subject: [PATCH] \n\n's no more break. --- source/overlays/storeSelect.cpp | 11 +---------- source/qr/qrcode.cpp | 11 +---------- source/store/entryInfo.cpp | 11 +---------- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/source/overlays/storeSelect.cpp b/source/overlays/storeSelect.cpp index 27f1734..abb9c3f 100644 --- a/source/overlays/storeSelect.cpp +++ b/source/overlays/storeSelect.cpp @@ -240,16 +240,7 @@ void Overlays::SelectStore(std::unique_ptr &store, std::vectorstores.size() > 0) { Gui::DrawStringCentered(0, 30, 0.7f, TEXT_COLOR, this->stores[this->selectedStore].Title, 390, 0, font); Gui::DrawStringCentered(0, 50, 0.6f, TEXT_COLOR, this->stores[this->selectedStore].Author, 380, 0, font); - - if (this->stores[this->selectedStore].Description != "") { - /* "\n\n" breaks C2D_WordWrap, so check here. */ - if (!(this->stores[this->selectedStore].Description.find("\n\n") != std::string::npos)) { - Gui::DrawStringCentered(0, 90, 0.5f, TEXT_COLOR, this->stores[this->selectedStore].Description, 380, 130, font, C2D_WordWrap); - - } else { - Gui::DrawStringCentered(0, 90, 0.5f, TEXT_COLOR, this->stores[this->selectedStore].Description, 380, 130, font); - } - } + Gui::DrawStringCentered(0, 90, 0.5f, TEXT_COLOR, this->stores[this->selectedStore].Description, 380, 130, font, C2D_WordWrap); } GFX::DrawBottom(); diff --git a/source/store/entryInfo.cpp b/source/store/entryInfo.cpp index 4082b8d..4669535 100644 --- a/source/store/entryInfo.cpp +++ b/source/store/entryInfo.cpp @@ -45,16 +45,7 @@ void StoreUtils::DrawEntryInfo(const std::unique_ptr &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);