mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Add the new metadata field md_title to grid, video and detailed views
Unlike the others, it is by default positioned offscreen
This commit is contained in:
parent
b622a4272e
commit
e575f7708e
|
@ -306,6 +306,7 @@ You can now change the order in which elements are rendered by setting `zIndex`
|
||||||
* `datetime name="md_lastplayed"`
|
* `datetime name="md_lastplayed"`
|
||||||
* `text name="md_playcount"`
|
* `text name="md_playcount"`
|
||||||
* `text name="md_description"`
|
* `text name="md_description"`
|
||||||
|
* `text name="md_name"`
|
||||||
* System Logo/Text - 50
|
* System Logo/Text - 50
|
||||||
* `text name="logoText"`
|
* `text name="logoText"`
|
||||||
* `image name="logo"`
|
* `image name="logo"`
|
||||||
|
@ -409,6 +410,8 @@ Reference
|
||||||
- The "playcount" metadata (number of times the game has been played).
|
- The "playcount" metadata (number of times the game has been played).
|
||||||
* `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX
|
* `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX
|
||||||
- Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen.
|
- Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen.
|
||||||
|
* `text name="md_name"` - ALL
|
||||||
|
- The "name" metadata (the game name). Unlike the others metadata fields, the name is positioned offscreen by default
|
||||||
|
|
||||||
#### video
|
#### video
|
||||||
* `helpsystem name="help"` - ALL
|
* `helpsystem name="help"` - ALL
|
||||||
|
@ -460,6 +463,8 @@ Reference
|
||||||
- The "playcount" metadata (number of times the game has been played).
|
- The "playcount" metadata (number of times the game has been played).
|
||||||
* `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX
|
* `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX
|
||||||
- Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen.
|
- Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen.
|
||||||
|
* `text name="md_name"` - ALL
|
||||||
|
- The "name" metadata (the game name). Unlike the others metadata fields, the name is positioned offscreen by default
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -511,6 +516,8 @@ Reference
|
||||||
- The "playcount" metadata (number of times the game has been played).
|
- The "playcount" metadata (number of times the game has been played).
|
||||||
* `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX
|
* `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX
|
||||||
- Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen.
|
- Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen.
|
||||||
|
* `text name="md_name"` - ALL
|
||||||
|
- The "name" metadata (the game name). Unlike the others metadata fields, the name is positioned offscreen by default
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,8 @@ DetailedGameListView::DetailedGameListView(Window* window, FileData* root) :
|
||||||
mLblGenre(window), mLblPlayers(window), mLblLastPlayed(window), mLblPlayCount(window),
|
mLblGenre(window), mLblPlayers(window), mLblLastPlayed(window), mLblPlayCount(window),
|
||||||
|
|
||||||
mRating(window), mReleaseDate(window), mDeveloper(window), mPublisher(window),
|
mRating(window), mReleaseDate(window), mDeveloper(window), mPublisher(window),
|
||||||
mGenre(window), mPlayers(window), mLastPlayed(window), mPlayCount(window)
|
mGenre(window), mPlayers(window), mLastPlayed(window), mPlayCount(window),
|
||||||
|
mName(window)
|
||||||
{
|
{
|
||||||
//mHeaderImage.setPosition(mSize.x() * 0.25f, 0);
|
//mHeaderImage.setPosition(mSize.x() * 0.25f, 0);
|
||||||
|
|
||||||
|
@ -57,6 +58,13 @@ DetailedGameListView::DetailedGameListView(Window* window, FileData* root) :
|
||||||
addChild(&mLblPlayCount);
|
addChild(&mLblPlayCount);
|
||||||
addChild(&mPlayCount);
|
addChild(&mPlayCount);
|
||||||
|
|
||||||
|
mName.setPosition(mSize.x(), mSize.y());
|
||||||
|
mName.setDefaultZIndex(40);
|
||||||
|
mName.setColor(0xAAAAAAFF);
|
||||||
|
mName.setFont(Font::get(FONT_SIZE_MEDIUM));
|
||||||
|
mName.setHorizontalAlignment(ALIGN_CENTER);
|
||||||
|
addChild(&mName);
|
||||||
|
|
||||||
mDescContainer.setPosition(mSize.x() * padding, mSize.y() * 0.65f);
|
mDescContainer.setPosition(mSize.x() * padding, mSize.y() * 0.65f);
|
||||||
mDescContainer.setSize(mSize.x() * (0.50f - 2*padding), mSize.y() - mDescContainer.getPosition().y());
|
mDescContainer.setSize(mSize.x() * (0.50f - 2*padding), mSize.y() - mDescContainer.getPosition().y());
|
||||||
mDescContainer.setAutoScroll(true);
|
mDescContainer.setAutoScroll(true);
|
||||||
|
@ -79,6 +87,7 @@ void DetailedGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& them
|
||||||
|
|
||||||
using namespace ThemeFlags;
|
using namespace ThemeFlags;
|
||||||
mImage.applyTheme(theme, getName(), "md_image", POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION);
|
mImage.applyTheme(theme, getName(), "md_image", POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION);
|
||||||
|
mName.applyTheme(theme, getName(), "md_name", ALL);
|
||||||
|
|
||||||
initMDLabels();
|
initMDLabels();
|
||||||
std::vector<TextComponent*> labels = getMDLabels();
|
std::vector<TextComponent*> labels = getMDLabels();
|
||||||
|
@ -200,6 +209,7 @@ void DetailedGameListView::updateInfoPanel()
|
||||||
mPublisher.setValue(file->metadata.get("publisher"));
|
mPublisher.setValue(file->metadata.get("publisher"));
|
||||||
mGenre.setValue(file->metadata.get("genre"));
|
mGenre.setValue(file->metadata.get("genre"));
|
||||||
mPlayers.setValue(file->metadata.get("players"));
|
mPlayers.setValue(file->metadata.get("players"));
|
||||||
|
mName.setValue(file->metadata.get("name"));
|
||||||
|
|
||||||
if(file->getType() == GAME)
|
if(file->getType() == GAME)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,7 @@ private:
|
||||||
TextComponent mPlayers;
|
TextComponent mPlayers;
|
||||||
DateTimeComponent mLastPlayed;
|
DateTimeComponent mLastPlayed;
|
||||||
TextComponent mPlayCount;
|
TextComponent mPlayCount;
|
||||||
|
TextComponent mName;
|
||||||
|
|
||||||
std::vector<TextComponent*> getMDLabels();
|
std::vector<TextComponent*> getMDLabels();
|
||||||
std::vector<GuiComponent*> getMDValues();
|
std::vector<GuiComponent*> getMDValues();
|
||||||
|
|
|
@ -16,7 +16,8 @@ GridGameListView::GridGameListView(Window* window, FileData* root) :
|
||||||
mLblGenre(window), mLblPlayers(window), mLblLastPlayed(window), mLblPlayCount(window),
|
mLblGenre(window), mLblPlayers(window), mLblLastPlayed(window), mLblPlayCount(window),
|
||||||
|
|
||||||
mRating(window), mReleaseDate(window), mDeveloper(window), mPublisher(window),
|
mRating(window), mReleaseDate(window), mDeveloper(window), mPublisher(window),
|
||||||
mGenre(window), mPlayers(window), mLastPlayed(window), mPlayCount(window)
|
mGenre(window), mPlayers(window), mLastPlayed(window), mPlayCount(window),
|
||||||
|
mName(window)
|
||||||
{
|
{
|
||||||
const float padding = 0.01f;
|
const float padding = 0.01f;
|
||||||
|
|
||||||
|
@ -54,6 +55,13 @@ GridGameListView::GridGameListView(Window* window, FileData* root) :
|
||||||
addChild(&mLblPlayCount);
|
addChild(&mLblPlayCount);
|
||||||
addChild(&mPlayCount);
|
addChild(&mPlayCount);
|
||||||
|
|
||||||
|
mName.setPosition(mSize.x(), mSize.y());
|
||||||
|
mName.setDefaultZIndex(40);
|
||||||
|
mName.setColor(0xAAAAAAFF);
|
||||||
|
mName.setFont(Font::get(FONT_SIZE_MEDIUM));
|
||||||
|
mName.setHorizontalAlignment(ALIGN_CENTER);
|
||||||
|
addChild(&mName);
|
||||||
|
|
||||||
mDescContainer.setPosition(mSize.x() * padding, mSize.y() * 0.65f);
|
mDescContainer.setPosition(mSize.x() * padding, mSize.y() * 0.65f);
|
||||||
mDescContainer.setSize(mSize.x() * (0.50f - 2*padding), mSize.y() - mDescContainer.getPosition().y());
|
mDescContainer.setSize(mSize.x() * (0.50f - 2*padding), mSize.y() - mDescContainer.getPosition().y());
|
||||||
mDescContainer.setAutoScroll(true);
|
mDescContainer.setAutoScroll(true);
|
||||||
|
@ -126,6 +134,7 @@ void GridGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
||||||
using namespace ThemeFlags;
|
using namespace ThemeFlags;
|
||||||
|
|
||||||
mGrid.applyTheme(theme, getName(), "gamegrid", ALL);
|
mGrid.applyTheme(theme, getName(), "gamegrid", ALL);
|
||||||
|
mName.applyTheme(theme, getName(), "md_name", ALL);
|
||||||
|
|
||||||
initMDLabels();
|
initMDLabels();
|
||||||
std::vector<TextComponent*> labels = getMDLabels();
|
std::vector<TextComponent*> labels = getMDLabels();
|
||||||
|
@ -245,6 +254,7 @@ void GridGameListView::updateInfoPanel()
|
||||||
mPublisher.setValue(file->metadata.get("publisher"));
|
mPublisher.setValue(file->metadata.get("publisher"));
|
||||||
mGenre.setValue(file->metadata.get("genre"));
|
mGenre.setValue(file->metadata.get("genre"));
|
||||||
mPlayers.setValue(file->metadata.get("players"));
|
mPlayers.setValue(file->metadata.get("players"));
|
||||||
|
mName.setValue(file->metadata.get("name"));
|
||||||
|
|
||||||
if(file->getType() == GAME)
|
if(file->getType() == GAME)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,6 +50,7 @@ private:
|
||||||
TextComponent mPlayers;
|
TextComponent mPlayers;
|
||||||
DateTimeComponent mLastPlayed;
|
DateTimeComponent mLastPlayed;
|
||||||
TextComponent mPlayCount;
|
TextComponent mPlayCount;
|
||||||
|
TextComponent mName;
|
||||||
|
|
||||||
std::vector<TextComponent*> getMDLabels();
|
std::vector<TextComponent*> getMDLabels();
|
||||||
std::vector<GuiComponent*> getMDValues();
|
std::vector<GuiComponent*> getMDValues();
|
||||||
|
|
|
@ -23,7 +23,8 @@ VideoGameListView::VideoGameListView(Window* window, FileData* root) :
|
||||||
mLblGenre(window), mLblPlayers(window), mLblLastPlayed(window), mLblPlayCount(window),
|
mLblGenre(window), mLblPlayers(window), mLblLastPlayed(window), mLblPlayCount(window),
|
||||||
|
|
||||||
mRating(window), mReleaseDate(window), mDeveloper(window), mPublisher(window),
|
mRating(window), mReleaseDate(window), mDeveloper(window), mPublisher(window),
|
||||||
mGenre(window), mPlayers(window), mLastPlayed(window), mPlayCount(window)
|
mGenre(window), mPlayers(window), mLastPlayed(window), mPlayCount(window),
|
||||||
|
mName(window)
|
||||||
{
|
{
|
||||||
const float padding = 0.01f;
|
const float padding = 0.01f;
|
||||||
|
|
||||||
|
@ -91,6 +92,13 @@ VideoGameListView::VideoGameListView(Window* window, FileData* root) :
|
||||||
addChild(&mLblPlayCount);
|
addChild(&mLblPlayCount);
|
||||||
addChild(&mPlayCount);
|
addChild(&mPlayCount);
|
||||||
|
|
||||||
|
mName.setPosition(mSize.x(), mSize.y());
|
||||||
|
mName.setDefaultZIndex(40);
|
||||||
|
mName.setColor(0xAAAAAAFF);
|
||||||
|
mName.setFont(Font::get(FONT_SIZE_MEDIUM));
|
||||||
|
mName.setHorizontalAlignment(ALIGN_CENTER);
|
||||||
|
addChild(&mName);
|
||||||
|
|
||||||
mDescContainer.setPosition(mSize.x() * padding, mSize.y() * 0.65f);
|
mDescContainer.setPosition(mSize.x() * padding, mSize.y() * 0.65f);
|
||||||
mDescContainer.setSize(mSize.x() * (0.50f - 2*padding), mSize.y() - mDescContainer.getPosition().y());
|
mDescContainer.setSize(mSize.x() * (0.50f - 2*padding), mSize.y() - mDescContainer.getPosition().y());
|
||||||
mDescContainer.setAutoScroll(true);
|
mDescContainer.setAutoScroll(true);
|
||||||
|
@ -118,6 +126,7 @@ void VideoGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
||||||
mMarquee.applyTheme(theme, getName(), "md_marquee", POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION);
|
mMarquee.applyTheme(theme, getName(), "md_marquee", POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION);
|
||||||
mImage.applyTheme(theme, getName(), "md_image", POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION);
|
mImage.applyTheme(theme, getName(), "md_image", POSITION | ThemeFlags::SIZE | Z_INDEX | ROTATION);
|
||||||
mVideo->applyTheme(theme, getName(), "md_video", POSITION | ThemeFlags::SIZE | ThemeFlags::DELAY | Z_INDEX | ROTATION);
|
mVideo->applyTheme(theme, getName(), "md_video", POSITION | ThemeFlags::SIZE | ThemeFlags::DELAY | Z_INDEX | ROTATION);
|
||||||
|
mName.applyTheme(theme, getName(), "md_name", ALL);
|
||||||
|
|
||||||
initMDLabels();
|
initMDLabels();
|
||||||
std::vector<TextComponent*> labels = getMDLabels();
|
std::vector<TextComponent*> labels = getMDLabels();
|
||||||
|
@ -256,6 +265,7 @@ void VideoGameListView::updateInfoPanel()
|
||||||
mPublisher.setValue(file->metadata.get("publisher"));
|
mPublisher.setValue(file->metadata.get("publisher"));
|
||||||
mGenre.setValue(file->metadata.get("genre"));
|
mGenre.setValue(file->metadata.get("genre"));
|
||||||
mPlayers.setValue(file->metadata.get("players"));
|
mPlayers.setValue(file->metadata.get("players"));
|
||||||
|
mName.setValue(file->metadata.get("name"));
|
||||||
|
|
||||||
if(file->getType() == GAME)
|
if(file->getType() == GAME)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,6 +45,7 @@ private:
|
||||||
TextComponent mPlayers;
|
TextComponent mPlayers;
|
||||||
DateTimeComponent mLastPlayed;
|
DateTimeComponent mLastPlayed;
|
||||||
TextComponent mPlayCount;
|
TextComponent mPlayCount;
|
||||||
|
TextComponent mName;
|
||||||
|
|
||||||
std::vector<TextComponent*> getMDLabels();
|
std::vector<TextComponent*> getMDLabels();
|
||||||
std::vector<GuiComponent*> getMDValues();
|
std::vector<GuiComponent*> getMDValues();
|
||||||
|
|
Loading…
Reference in a new issue