mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-30 12:05:39 +00:00
Removed "infoPanel" element.
Faked it so the <text name="description"> element looks like it has no container.
This commit is contained in:
parent
8b688d3913
commit
5b5e99c366
27
THEMES.md
27
THEMES.md
|
@ -194,8 +194,7 @@ Reference
|
||||||
* image name="header" - POSITION | SIZE | PATH
|
* image name="header" - POSITION | SIZE | PATH
|
||||||
* textlist name="gamelist" - ALL
|
* textlist name="gamelist" - ALL
|
||||||
* image name="gameimage" - POSITION | SIZE
|
* image name="gameimage" - POSITION | SIZE
|
||||||
* container name="infoPanel" - POSITION | SIZE
|
* text name="description" - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR
|
||||||
* text name="description" - POSITION | FONT_PATH | FONT_SIZE | COLOR
|
|
||||||
|
|
||||||
#### grid
|
#### grid
|
||||||
* image name="background" - PATH | TILING
|
* image name="background" - PATH | TILING
|
||||||
|
@ -217,6 +216,16 @@ Reference
|
||||||
* text name="subtext" - FONT_PATH | COLOR
|
* text name="subtext" - FONT_PATH | COLOR
|
||||||
|
|
||||||
|
|
||||||
|
## Types of properties:
|
||||||
|
|
||||||
|
* NORMALIZED_PAIR - two decimals, in the range [0..1]. For example, `0.25 0.5`.
|
||||||
|
* PATH - a path. If the first character is a `~`, it will be expanded into the environment variable for the home path (`$HOME` or `%HOMEPATH%`, depending on platform). If the first character is a `.`, it will be expanded to the theme file's directory.
|
||||||
|
* BOOLEAN - `true`/`1` or `false`/`0`.
|
||||||
|
* COLOR - a hexidecimal RGB or RGBA color (6 or 8 digits). If 6 digits, will assume the alpha channel is `FF` (not transparent).
|
||||||
|
* FLOAT - a decimal.
|
||||||
|
* STRING - a string of text.
|
||||||
|
|
||||||
|
|
||||||
## Types of elements and their properties:
|
## Types of elements and their properties:
|
||||||
|
|
||||||
#### image
|
#### image
|
||||||
|
@ -248,10 +257,6 @@ Reference
|
||||||
* `scrollSound` - type: PATH.
|
* `scrollSound` - type: PATH.
|
||||||
* `center` - type: BOOLEAN.
|
* `center` - type: BOOLEAN.
|
||||||
|
|
||||||
#### container
|
|
||||||
* `pos` - type: NORMALIZED_PAIR.
|
|
||||||
* `size` - type: NORMALIZED_PAIR.
|
|
||||||
|
|
||||||
#### ninepatch
|
#### ninepatch
|
||||||
* `pos` - type: NORMALIZED_PAIR.
|
* `pos` - type: NORMALIZED_PAIR.
|
||||||
* `size` - type: NORMALIZED_PAIR.
|
* `size` - type: NORMALIZED_PAIR.
|
||||||
|
@ -266,16 +271,6 @@ A quick word on the "ninepatch" type - EmulationStation borrows the concept of "
|
||||||
*Note that a view may choose to only make only certain properties on a particular element themable.*
|
*Note that a view may choose to only make only certain properties on a particular element themable.*
|
||||||
|
|
||||||
|
|
||||||
## Types of properties:
|
|
||||||
|
|
||||||
* NORMALIZED_PAIR - two decimals, in the range [0..1]. For example, `0.25 0.5`.
|
|
||||||
* PATH - a path. If the first character is a `~`, it will be expanded into the environment variable for the home path (`$HOME` or `%HOMEPATH%`, depending on platform). If the first character is a `.`, it will be expanded to the theme file's directory.
|
|
||||||
* BOOLEAN - `true`/`1` or `false`/`0`.
|
|
||||||
* COLOR - a hexidecimal RGB or RGBA color (6 or 8 digits). If 6 digits, will assume the alpha channel is `FF` (not transparent).
|
|
||||||
* FLOAT - a decimal.
|
|
||||||
* STRING - a string of text.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-Aloshi
|
-Aloshi
|
||||||
http://www.aloshi.com
|
http://www.aloshi.com
|
||||||
|
|
|
@ -80,7 +80,10 @@ void ScrollableContainer::update(int deltaTime)
|
||||||
Eigen::Vector2f contentSize = getContentSize();
|
Eigen::Vector2f contentSize = getContentSize();
|
||||||
if(mScrollPos.x() + getSize().x() > contentSize.x())
|
if(mScrollPos.x() + getSize().x() > contentSize.x())
|
||||||
mScrollPos[0] = (double)contentSize.x() - getSize().x();
|
mScrollPos[0] = (double)contentSize.x() - getSize().x();
|
||||||
if(mScrollPos.y() + getSize().y() > contentSize.y())
|
|
||||||
|
if(contentSize.y() < getSize().y())
|
||||||
|
mScrollPos[1] = 0;
|
||||||
|
else if(mScrollPos.y() + getSize().y() > contentSize.y())
|
||||||
mScrollPos[1] = (double)contentSize.y() - getSize().y();
|
mScrollPos[1] = (double)contentSize.y() - getSize().y();
|
||||||
|
|
||||||
GuiComponent::update(deltaTime);
|
GuiComponent::update(deltaTime);
|
||||||
|
|
|
@ -39,8 +39,10 @@ void DetailedGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& them
|
||||||
|
|
||||||
using namespace ThemeFlags;
|
using namespace ThemeFlags;
|
||||||
mImage.applyTheme(theme, getName(), "gameimage", POSITION | ThemeFlags::SIZE);
|
mImage.applyTheme(theme, getName(), "gameimage", POSITION | ThemeFlags::SIZE);
|
||||||
mDescContainer.applyTheme(theme, getName(), "infoPanel", POSITION | ThemeFlags::SIZE);
|
|
||||||
mDescription.applyTheme(theme, getName(), "description", POSITION | ThemeFlags::SIZE | FONT_PATH | FONT_SIZE | COLOR);
|
mDescContainer.applyTheme(theme, getName(), "description", POSITION | ThemeFlags::SIZE);
|
||||||
|
mDescription.setSize(mDescContainer.getSize().x(), 0);
|
||||||
|
mDescription.applyTheme(theme, getName(), "description", FONT_PATH | FONT_SIZE | COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetailedGameListView::updateInfoPanel()
|
void DetailedGameListView::updateInfoPanel()
|
||||||
|
@ -56,6 +58,7 @@ void DetailedGameListView::updateInfoPanel()
|
||||||
|
|
||||||
mDescription.setText(file->metadata.get("desc"));
|
mDescription.setText(file->metadata.get("desc"));
|
||||||
mDescContainer.resetAutoScrollTimer();
|
mDescContainer.resetAutoScrollTimer();
|
||||||
|
mDescContainer.setScrollPos(Eigen::Vector2d(0, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue