mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Renamed all theme "header" elements to "logo" (and "headerText" to
"logoText"). Documentation updated to reflect the change.
This commit is contained in:
parent
6db26742ff
commit
70b3408823
22
THEMES.md
22
THEMES.md
|
|
@ -240,9 +240,9 @@ Reference
|
||||||
#### basic
|
#### basic
|
||||||
* `image name="background"` - ALL
|
* `image name="background"` - ALL
|
||||||
- This is a background image that exists for convenience. It goes from (0, 0) to (1, 1).
|
- This is a background image that exists for convenience. It goes from (0, 0) to (1, 1).
|
||||||
* `text name="headerText"` - ALL
|
* `text name="logoText"` - ALL
|
||||||
- A header text, which displays the name of the system. Displayed at the top center of the screen. Centered by default.
|
- Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default.
|
||||||
* `image name="header"` - ALL
|
* `image name="logo"` - ALL
|
||||||
- A header image. If a non-empty `path` is specified, `text name="headerText"` will be hidden and this image will be, by default, displayed roughly in its place.
|
- A header image. If a non-empty `path` is specified, `text name="headerText"` will be hidden and this image will be, by default, displayed roughly in its place.
|
||||||
* `textlist name="gamelist"` - ALL
|
* `textlist name="gamelist"` - ALL
|
||||||
- The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Centered by default.
|
- The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Centered by default.
|
||||||
|
|
@ -252,9 +252,9 @@ Reference
|
||||||
#### detailed
|
#### detailed
|
||||||
* `image name="background"` - ALL
|
* `image name="background"` - ALL
|
||||||
- This is a background image that exists for convenience. It goes from (0, 0) to (1, 1).
|
- This is a background image that exists for convenience. It goes from (0, 0) to (1, 1).
|
||||||
* `text name="headerText"` - ALL
|
* `text name="logoText"` - ALL
|
||||||
- A header text, which displays the name of the system. Displayed at the top center of the screen. Centered by default.
|
- Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default.
|
||||||
* `image name="header"` - ALL
|
* `image name="logo"` - ALL
|
||||||
- A header image. If a non-empty `path` is specified, `text name="headerText"` will be hidden and this image will be, by default, displayed roughly in its place.
|
- A header image. If a non-empty `path` is specified, `text name="headerText"` will be hidden and this image will be, by default, displayed roughly in its place.
|
||||||
* `textlist name="gamelist"` - ALL
|
* `textlist name="gamelist"` - ALL
|
||||||
- The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Left aligned by default.
|
- The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Left aligned by default.
|
||||||
|
|
@ -299,16 +299,16 @@ Reference
|
||||||
#### grid
|
#### grid
|
||||||
* `image name="background"` - ALL
|
* `image name="background"` - ALL
|
||||||
- This is a background image that exists for convenience. It goes from (0, 0) to (1, 1).
|
- This is a background image that exists for convenience. It goes from (0, 0) to (1, 1).
|
||||||
* `text name="headerText"` - ALL
|
* `text name="logoText"` - ALL
|
||||||
- A header text, which displays the name of the system. Displayed at the top center of the screen. Centered by default.
|
- Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default.
|
||||||
* `image name="header"` - ALL
|
* `image name="logo"` - ALL
|
||||||
- A header image. If a non-empty `path` is specified, `text name="headerText"` will be hidden and this image will be, by default, displayed roughly in its place.
|
- A header image. If a non-empty `path` is specified, `text name="headerText"` will be hidden and this image will be, by default, displayed roughly in its place.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### system
|
#### system
|
||||||
* `image name="header"` - PATH
|
* `image name="logo"` - PATH
|
||||||
- A header (logo) image, to be displayed in the system logo carousel.
|
- A logo image, to be displayed in the system logo carousel.
|
||||||
* You can use extra elements (elements with `extra="true"`) to add your own backgrounds, etc. They will be displayed behind the carousel, and scroll relative to the carousel.
|
* You can use extra elements (elements with `extra="true"`) to add your own backgrounds, etc. They will be displayed behind the carousel, and scroll relative to the carousel.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,11 @@ void SystemView::populate()
|
||||||
e.object = *it;
|
e.object = *it;
|
||||||
|
|
||||||
// make logo
|
// make logo
|
||||||
if(theme->getElement("system", "header", "image"))
|
if(theme->getElement("system", "logo", "image"))
|
||||||
{
|
{
|
||||||
ImageComponent* logo = new ImageComponent(mWindow);
|
ImageComponent* logo = new ImageComponent(mWindow);
|
||||||
logo->setMaxSize(logoSize());
|
logo->setMaxSize(logoSize());
|
||||||
logo->applyTheme((*it)->getTheme(), "system", "header", ThemeFlags::PATH);
|
logo->applyTheme((*it)->getTheme(), "system", "logo", ThemeFlags::PATH);
|
||||||
logo->setPosition((logoSize().x() - logo->getSize().x()) / 2, (logoSize().y() - logo->getSize().y()) / 2); // vertically and horizontally center
|
logo->setPosition((logoSize().x() - logo->getSize().x()) / 2, (logoSize().y() - logo->getSize().y()) / 2); // vertically and horizontally center
|
||||||
e.data.logo = std::shared_ptr<GuiComponent>(logo);
|
e.data.logo = std::shared_ptr<GuiComponent>(logo);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) : IGameListView(window, root),
|
ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) : IGameListView(window, root),
|
||||||
mHeaderText(window), mHeaderImage(window), mBackground(window), mThemeExtras(window)
|
mHeaderText(window), mHeaderImage(window), mBackground(window), mThemeExtras(window)
|
||||||
{
|
{
|
||||||
mHeaderText.setText("Header");
|
mHeaderText.setText("Logo Text");
|
||||||
mHeaderText.setSize(mSize.x(), 0);
|
mHeaderText.setSize(mSize.x(), 0);
|
||||||
mHeaderText.setPosition(0, 0);
|
mHeaderText.setPosition(0, 0);
|
||||||
mHeaderText.setCentered(true);
|
mHeaderText.setCentered(true);
|
||||||
|
|
@ -27,8 +27,8 @@ void ISimpleGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme
|
||||||
{
|
{
|
||||||
using namespace ThemeFlags;
|
using namespace ThemeFlags;
|
||||||
mBackground.applyTheme(theme, getName(), "background", ALL);
|
mBackground.applyTheme(theme, getName(), "background", ALL);
|
||||||
mHeaderImage.applyTheme(theme, getName(), "header", ALL);
|
mHeaderImage.applyTheme(theme, getName(), "logo", ALL);
|
||||||
mHeaderText.applyTheme(theme, getName(), "headerText", ALL);
|
mHeaderText.applyTheme(theme, getName(), "logoText", ALL);
|
||||||
mThemeExtras.setExtras(ThemeData::makeExtras(theme, getName(), mWindow));
|
mThemeExtras.setExtras(ThemeData::makeExtras(theme, getName(), mWindow));
|
||||||
|
|
||||||
if(mHeaderImage.hasImage())
|
if(mHeaderImage.hasImage())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue