mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-31 04:25:40 +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
|
||||
* `image name="background"` - ALL
|
||||
- This is a background image that exists for convenience. It goes from (0, 0) to (1, 1).
|
||||
* `text name="headerText"` - ALL
|
||||
- A header text, which displays the name of the system. Displayed at the top center of the screen. Centered by default.
|
||||
* `image name="header"` - ALL
|
||||
* `text name="logoText"` - ALL
|
||||
- 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="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.
|
||||
* `textlist name="gamelist"` - ALL
|
||||
- The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Centered by default.
|
||||
|
@ -252,9 +252,9 @@ Reference
|
|||
#### detailed
|
||||
* `image name="background"` - ALL
|
||||
- This is a background image that exists for convenience. It goes from (0, 0) to (1, 1).
|
||||
* `text name="headerText"` - ALL
|
||||
- A header text, which displays the name of the system. Displayed at the top center of the screen. Centered by default.
|
||||
* `image name="header"` - ALL
|
||||
* `text name="logoText"` - ALL
|
||||
- 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="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.
|
||||
* `textlist name="gamelist"` - ALL
|
||||
- The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Left aligned by default.
|
||||
|
@ -299,16 +299,16 @@ Reference
|
|||
#### grid
|
||||
* `image name="background"` - ALL
|
||||
- This is a background image that exists for convenience. It goes from (0, 0) to (1, 1).
|
||||
* `text name="headerText"` - ALL
|
||||
- A header text, which displays the name of the system. Displayed at the top center of the screen. Centered by default.
|
||||
* `image name="header"` - ALL
|
||||
* `text name="logoText"` - ALL
|
||||
- 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="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.
|
||||
|
||||
---
|
||||
|
||||
#### system
|
||||
* `image name="header"` - PATH
|
||||
- A header (logo) image, to be displayed in the system logo carousel.
|
||||
* `image name="logo"` - PATH
|
||||
- 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.
|
||||
---
|
||||
|
||||
|
|
|
@ -32,11 +32,11 @@ void SystemView::populate()
|
|||
e.object = *it;
|
||||
|
||||
// make logo
|
||||
if(theme->getElement("system", "header", "image"))
|
||||
if(theme->getElement("system", "logo", "image"))
|
||||
{
|
||||
ImageComponent* logo = new ImageComponent(mWindow);
|
||||
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
|
||||
e.data.logo = std::shared_ptr<GuiComponent>(logo);
|
||||
}else{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) : IGameListView(window, root),
|
||||
mHeaderText(window), mHeaderImage(window), mBackground(window), mThemeExtras(window)
|
||||
{
|
||||
mHeaderText.setText("Header");
|
||||
mHeaderText.setText("Logo Text");
|
||||
mHeaderText.setSize(mSize.x(), 0);
|
||||
mHeaderText.setPosition(0, 0);
|
||||
mHeaderText.setCentered(true);
|
||||
|
@ -27,8 +27,8 @@ void ISimpleGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme
|
|||
{
|
||||
using namespace ThemeFlags;
|
||||
mBackground.applyTheme(theme, getName(), "background", ALL);
|
||||
mHeaderImage.applyTheme(theme, getName(), "header", ALL);
|
||||
mHeaderText.applyTheme(theme, getName(), "headerText", ALL);
|
||||
mHeaderImage.applyTheme(theme, getName(), "logo", ALL);
|
||||
mHeaderText.applyTheme(theme, getName(), "logoText", ALL);
|
||||
mThemeExtras.setExtras(ThemeData::makeExtras(theme, getName(), mWindow));
|
||||
|
||||
if(mHeaderImage.hasImage())
|
||||
|
|
Loading…
Reference in a new issue