diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 57fb9f694..6f81c0bc9 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -33,8 +33,19 @@ #include "Window.h" ViewController* ViewController::sInstance = nullptr; +#if defined(_MSC_VER) // MSVC compiler. +const std::string ViewController::FAVORITE_CHAR = Utils::String::wideStringToString(L"\uF005"); +const std::string ViewController::FOLDER_CHAR = Utils::String::wideStringToString(L"\uF07C"); +const std::string ViewController::TICKMARK_CHAR = Utils::String::wideStringToString(L"\uF14A"); +const std::string ViewController::CONTROLLER_CHAR = Utils::String::wideStringToString(L"\uF11b"); +const std::string ViewController::FILTER_CHAR = Utils::String::wideStringToString(L"\uF0b0"); +#else const std::string ViewController::FAVORITE_CHAR = "\uF005"; const std::string ViewController::FOLDER_CHAR = "\uF07C"; +const std::string ViewController::TICKMARK_CHAR = "\uF14A"; +const std::string ViewController::CONTROLLER_CHAR = "\uF11b"; +const std::string ViewController::FILTER_CHAR = "\uF0b0"; +#endif ViewController* ViewController::get() { diff --git a/es-app/src/views/ViewController.h b/es-app/src/views/ViewController.h index 638d3cb28..362b8e1a9 100644 --- a/es-app/src/views/ViewController.h +++ b/es-app/src/views/ViewController.h @@ -106,6 +106,9 @@ public: static const std::string FAVORITE_CHAR; static const std::string FOLDER_CHAR; + static const std::string TICKMARK_CHAR; + static const std::string CONTROLLER_CHAR; + static const std::string FILTER_CHAR; private: ViewController(Window* window); diff --git a/es-app/src/views/gamelist/BasicGameListView.cpp b/es-app/src/views/gamelist/BasicGameListView.cpp index d780afe5d..fba7106ca 100644 --- a/es-app/src/views/gamelist/BasicGameListView.cpp +++ b/es-app/src/views/gamelist/BasicGameListView.cpp @@ -78,14 +78,14 @@ void BasicGameListView::populateList(const std::vector& files, FileDa // currently being edited. if (isEditing && (*it)->getType() == GAME) { if (CollectionSystemsManager::get()->inCustomCollection(editingCollection, (*it))) - inCollectionPrefix = "\uF14A "; + inCollectionPrefix = ViewController::TICKMARK_CHAR + " "; else inCollectionPrefix = ""; } if ((*it)->getFavorite() && favoriteStar && mRoot->getSystem()->getName() != "favorites") { - mList.add(inCollectionPrefix + ViewController::FAVORITE_CHAR + " " + (*it)->getName(), - *it, ((*it)->getType() == FOLDER)); + mList.add(inCollectionPrefix + ViewController::FAVORITE_CHAR + " " + + (*it)->getName(), *it, ((*it)->getType() == FOLDER)); } else if ((*it)->getType() == FOLDER && mRoot->getSystem()->getName() != "collections") { diff --git a/es-app/src/views/gamelist/DetailedGameListView.cpp b/es-app/src/views/gamelist/DetailedGameListView.cpp index 8e186aff4..b513c4277 100644 --- a/es-app/src/views/gamelist/DetailedGameListView.cpp +++ b/es-app/src/views/gamelist/DetailedGameListView.cpp @@ -355,22 +355,26 @@ void DetailedGameListView::updateInfoPanel() std::string gamelistInfoString; if (mIsFolder) - gamelistInfoString = "\uF07C "; + gamelistInfoString = ViewController::FOLDER_CHAR + " "; if (mIsFiltered) { if (mFilteredGameCountAll == mFilteredGameCount) - gamelistInfoString += "\uF0b0 " + std::to_string(mFilteredGameCount) + " / " + + gamelistInfoString += ViewController::FILTER_CHAR + " " + + std::to_string(mFilteredGameCount) + " / " + std::to_string(mGameCount); else - gamelistInfoString += "\uF0b0 " + std::to_string(mFilteredGameCount) + " + " + + gamelistInfoString += ViewController::FILTER_CHAR + " " + + std::to_string(mFilteredGameCount) + " + " + std::to_string(mFilteredGameCountAll - mFilteredGameCount) + " / " + std::to_string(mGameCount); } else { - gamelistInfoString += "\uF11b " + std::to_string(mGameCount); + gamelistInfoString += ViewController::CONTROLLER_CHAR + " " + + std::to_string(mGameCount); if (!(file->getSystem()->isCollection() && file->getSystem()->getFullName() == "favorites")) - gamelistInfoString += " \uF005 " + std::to_string(mFavoritesGameCount); + gamelistInfoString += " " + ViewController::FAVORITE_CHAR + " " + + std::to_string(mFavoritesGameCount); } mGamelistInfo.setValue(gamelistInfoString); diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp index ae6efdeb0..57d7d7ccd 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGameListView.cpp @@ -446,22 +446,25 @@ void GridGameListView::updateInfoPanel() if (mIsFiltered) { if (mFilteredGameCountAll == mFilteredGameCount) - gamelistInfoString += "\uF0b0 " + std::to_string(mFilteredGameCount) + " / " + - std::to_string(mGameCount); + gamelistInfoString += ViewController::FILTER_CHAR + " " + + std::to_string(mFilteredGameCount) + " / " + std::to_string(mGameCount); else - gamelistInfoString += "\uF0b0 " + std::to_string(mFilteredGameCount) + " + " + + gamelistInfoString += ViewController::FILTER_CHAR + " " + + std::to_string(mFilteredGameCount) + " + " + std::to_string(mFilteredGameCountAll - mFilteredGameCount) + " / " + std::to_string(mGameCount); } else { - gamelistInfoString += "\uF11b " + std::to_string(mGameCount); + gamelistInfoString += ViewController::CONTROLLER_CHAR + " " + + std::to_string(mGameCount); if (!(file->getSystem()->isCollection() && file->getSystem()->getFullName() == "favorites")) - gamelistInfoString += " \uF005 " + std::to_string(mFavoritesGameCount); + gamelistInfoString += " " + ViewController::FAVORITE_CHAR + " " + + std::to_string(mFavoritesGameCount); } if (mIsFolder) - gamelistInfoString += " \uF07C"; + gamelistInfoString += " " + ViewController::FOLDER_CHAR; mGamelistInfo.setValue(gamelistInfoString); diff --git a/es-app/src/views/gamelist/VideoGameListView.cpp b/es-app/src/views/gamelist/VideoGameListView.cpp index f05392816..96dd397c7 100644 --- a/es-app/src/views/gamelist/VideoGameListView.cpp +++ b/es-app/src/views/gamelist/VideoGameListView.cpp @@ -398,22 +398,26 @@ void VideoGameListView::updateInfoPanel() std::string gamelistInfoString; if (mIsFolder) - gamelistInfoString = "\uF07C "; + gamelistInfoString = ViewController::FOLDER_CHAR + " "; if (mIsFiltered) { if (mFilteredGameCountAll == mFilteredGameCount) - gamelistInfoString += "\uF0b0 " + std::to_string(mFilteredGameCount) + " / " + + gamelistInfoString += ViewController::FILTER_CHAR + " " + + std::to_string(mFilteredGameCount) + " / " + std::to_string(mGameCount); else - gamelistInfoString += "\uF0b0 " + std::to_string(mFilteredGameCount) + " + " + + gamelistInfoString += ViewController::FILTER_CHAR + " " + + std::to_string(mFilteredGameCount) + " + " + std::to_string(mFilteredGameCountAll - mFilteredGameCount) + " / " + std::to_string(mGameCount); } else { - gamelistInfoString += "\uF11b " + std::to_string(mGameCount); + gamelistInfoString += ViewController::CONTROLLER_CHAR + " " + + std::to_string(mGameCount); if (!(file->getSystem()->isCollection() && file->getSystem()->getFullName() == "favorites")) - gamelistInfoString += " \uF005 " + std::to_string(mFavoritesGameCount); + gamelistInfoString += " " + ViewController::FAVORITE_CHAR + " " + + std::to_string(mFavoritesGameCount); } mGamelistInfo.setValue(gamelistInfoString);