Multiple smaller optimizations.

This commit is contained in:
Leon Styhre 2021-09-28 21:49:46 +02:00
parent 0077e334b7
commit 49347baffe
5 changed files with 27 additions and 27 deletions

View file

@ -128,9 +128,9 @@ GuiGamelistOptions::GuiGamelistOptions(Window* window, SystemData* system)
for (unsigned int i = 0; i < numSortTypes; i++) {
const FileData::SortType& sort = FileSorts::SortTypes.at(i);
if (sort.description == sortType)
mListSort->add(sort.description, &sort, 1);
mListSort->add(sort.description, &sort, true);
else
mListSort->add(sort.description, &sort, 0);
mListSort->add(sort.description, &sort, false);
}
// Don't show the sort type option if the gamelist type is recent/last played.
if (system->getName() != "recent")

View file

@ -75,29 +75,29 @@ DetailedGameListView::DetailedGameListView(Window* window, FileData* root)
addChild(&mImage);
// Metadata labels + values.
mLblRating.setText("Rating: ");
mLblRating.setText("Rating: ", false);
addChild(&mLblRating);
addChild(&mRating);
mLblReleaseDate.setText("Released: ");
mLblReleaseDate.setText("Released: ", false);
addChild(&mLblReleaseDate);
addChild(&mReleaseDate);
mLblDeveloper.setText("Developer: ");
mLblDeveloper.setText("Developer: ", false);
addChild(&mLblDeveloper);
addChild(&mDeveloper);
mLblPublisher.setText("Publisher: ");
mLblPublisher.setText("Publisher: ", false);
addChild(&mLblPublisher);
addChild(&mPublisher);
mLblGenre.setText("Genre: ");
mLblGenre.setText("Genre: ", false);
addChild(&mLblGenre);
addChild(&mGenre);
mLblPlayers.setText("Players: ");
mLblPlayers.setText("Players: ", false);
addChild(&mLblPlayers);
addChild(&mPlayers);
mLblLastPlayed.setText("Last played: ");
mLblLastPlayed.setText("Last played: ", false);
addChild(&mLblLastPlayed);
mLastPlayed.setDisplayRelative(true);
addChild(&mLastPlayed);
mLblPlayCount.setText("Times played: ");
mLblPlayCount.setText("Times played: ", false);
addChild(&mLblPlayCount);
addChild(&mPlayCount);

View file

@ -55,29 +55,29 @@ GridGameListView::GridGameListView(Window* window, FileData* root)
populateList(root->getChildrenListToDisplay(), root);
// Metadata labels + values.
mLblRating.setText("Rating: ");
mLblRating.setText("Rating: ", false);
addChild(&mLblRating);
addChild(&mRating);
mLblReleaseDate.setText("Released: ");
mLblReleaseDate.setText("Released: ", false);
addChild(&mLblReleaseDate);
addChild(&mReleaseDate);
mLblDeveloper.setText("Developer: ");
mLblDeveloper.setText("Developer: ", false);
addChild(&mLblDeveloper);
addChild(&mDeveloper);
mLblPublisher.setText("Publisher: ");
mLblPublisher.setText("Publisher: ", false);
addChild(&mLblPublisher);
addChild(&mPublisher);
mLblGenre.setText("Genre: ");
mLblGenre.setText("Genre: ", false);
addChild(&mLblGenre);
addChild(&mGenre);
mLblPlayers.setText("Players: ");
mLblPlayers.setText("Players: ", false);
addChild(&mLblPlayers);
addChild(&mPlayers);
mLblLastPlayed.setText("Last played: ");
mLblLastPlayed.setText("Last played: ", false);
addChild(&mLblLastPlayed);
mLastPlayed.setDisplayRelative(true);
addChild(&mLastPlayed);
mLblPlayCount.setText("Times played: ");
mLblPlayCount.setText("Times played: ", false);
addChild(&mLblPlayCount);
addChild(&mPlayCount);

View file

@ -27,7 +27,7 @@ ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root)
, mBackground(window)
, mRandomGame(nullptr)
{
mHeaderText.setText("Logo Text");
mHeaderText.setText("Logo Text", false);
mHeaderText.setSize(mSize.x, 0.0f);
mHeaderText.setPosition(0.0f, 0.0f);
mHeaderText.setHorizontalAlignment(ALIGN_CENTER);

View file

@ -92,29 +92,29 @@ VideoGameListView::VideoGameListView(Window* window, FileData* root)
addChild(mVideo);
// Metadata labels + values.
mLblRating.setText("Rating: ");
mLblRating.setText("Rating: ", false);
addChild(&mLblRating);
addChild(&mRating);
mLblReleaseDate.setText("Released: ");
mLblReleaseDate.setText("Released: ", false);
addChild(&mLblReleaseDate);
addChild(&mReleaseDate);
mLblDeveloper.setText("Developer: ");
mLblDeveloper.setText("Developer: ", false);
addChild(&mLblDeveloper);
addChild(&mDeveloper);
mLblPublisher.setText("Publisher: ");
mLblPublisher.setText("Publisher: ", false);
addChild(&mLblPublisher);
addChild(&mPublisher);
mLblGenre.setText("Genre: ");
mLblGenre.setText("Genre: ", false);
addChild(&mLblGenre);
addChild(&mGenre);
mLblPlayers.setText("Players: ");
mLblPlayers.setText("Players: ", false);
addChild(&mLblPlayers);
addChild(&mPlayers);
mLblLastPlayed.setText("Last played: ");
mLblLastPlayed.setText("Last played: ", false);
addChild(&mLblLastPlayed);
mLastPlayed.setDisplayRelative(true);
addChild(&mLastPlayed);
mLblPlayCount.setText("Times played: ");
mLblPlayCount.setText("Times played: ", false);
addChild(&mLblPlayCount);
addChild(&mPlayCount);