mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Added color tag to ImageComponent (for colorshift).
Changed TextComponent's truncation from ".." to "...". Updated documentation.
This commit is contained in:
parent
305e91c9f8
commit
8eb9800127
13
README.md
13
README.md
|
@ -12,7 +12,7 @@ I found a bug! I have a problem!
|
|||
- First, try to check the [issue list](https://github.com/Aloshi/EmulationStation/issues?state=open) for some entries that might match your problem. Make sure to check closed issues too!
|
||||
- If you're running EmulationStation on a on Raspberry Pi and have problems with config file changes not taking effect, content missing after editing, etc., check if your SD card is corrupted (see issues [#78](https://github.com/Aloshi/EmulationStation/issues/78) and [#107](https://github.com/Aloshi/EmulationStation/issues/107)). You can do this with free tools like [h2testw](http://www.heise.de/download/h2testw.html) or [F3](http://oss.digirati.com.br/f3/).
|
||||
- Try to update to the latest version of EmulationStation using git (you might need to delete your `es_input.cfg` and `es_settings.cfg` after that to reset them to default values):
|
||||
```
|
||||
```bash
|
||||
cd EmulationStation
|
||||
git pull
|
||||
export CXX=g++-4.7
|
||||
|
@ -31,12 +31,12 @@ EmulationStation has a few dependencies. For building, you'll need SDL2, Boost (
|
|||
|
||||
**On Linux:**
|
||||
All of this be easily installed with apt-get:
|
||||
```
|
||||
```bash
|
||||
sudo apt-get install libsdl2-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-date-time-dev libfreeimage-dev libfreetype6-dev libeigen3-dev libcurl-dev ttf-dejavu libasound2-dev
|
||||
```
|
||||
|
||||
Unless you're on the Raspberry Pi, you'll also need OpenGL:
|
||||
```
|
||||
```bash
|
||||
sudo apt-get install libgl1-mesa-dev
|
||||
```
|
||||
|
||||
|
@ -121,7 +121,7 @@ The order EmulationStation displays systems reflects the order you define them i
|
|||
|
||||
Here's an example es_systems.cfg:
|
||||
|
||||
```
|
||||
```xml
|
||||
<!-- This is the EmulationStation Systems configuration file.
|
||||
All systems must be contained within the <systemList> tag.-->
|
||||
|
||||
|
@ -144,6 +144,9 @@ All systems must be contained within the <systemList> tag.-->
|
|||
<!-- The shell command executed when a game is selected. A few special tags are replaced if found in a command, like %ROM%. -->
|
||||
<command>snesemulator %ROM%</command>
|
||||
<!-- This example would run the bash command "snesemulator /home/user/roms/snes/Super\ Mario\ World.sfc". -->
|
||||
|
||||
<!-- The Platform ID to use for scraping. 42 is the platform ID for the SNES. You can see the full list in src/PlatformIds.h. -->
|
||||
<platformid>42</system>
|
||||
</system>
|
||||
</systemList>
|
||||
```
|
||||
|
@ -165,7 +168,7 @@ The gamelist.xml for a system defines metadata for a system's games, such as a n
|
|||
If a file named gamelist.xml is found in the root of a system's search directory OR within `~/.emulationstation/%NAME%/`, game metadata will be loaded from it. This allows you to define images, descriptions, and different names for files. Note that only standard ASCII characters are supported for text (if you see a weird [X] symbol, you're probably using unicode!).
|
||||
Images will be automatically resized to fit within the left column of the screen. Smaller images will load faster, so try to keep your resolution low.
|
||||
An example gamelist.xml:
|
||||
```
|
||||
```xml
|
||||
<gameList>
|
||||
<game>
|
||||
<path>/home/pi/ROMs/nes/mm2.nes</path>
|
||||
|
|
|
@ -317,6 +317,8 @@ Can be created as an extra.
|
|||
- Path to the image file. Most common extensions are supported (including .jpg, .png, and unanimated .gif).
|
||||
* `tile` - type: BOOLEAN.
|
||||
- If true, the image will be tiled instead of stretched to fit its size. Useful for backgrounds.
|
||||
* `color` - type: COLOR.
|
||||
- Multiply each pixel's color by this color. For example, an all-white image with `<color>FF0000</color>` would become completely red.
|
||||
|
||||
#### text
|
||||
|
||||
|
@ -324,7 +326,10 @@ Can be created as an extra.
|
|||
|
||||
* `pos` - type: NORMALIZED_PAIR.
|
||||
* `size` - type: NORMALIZED_PAIR.
|
||||
- You should only set this if you want your text to behave like a "textbox" - that is, your text is multi-line and should wrap.
|
||||
- Possible combinations:
|
||||
- `0 0` - automatically size so text fits on one line (expanding horizontally).
|
||||
- `w 0` - automatically wrap text so it doesn't go beyond `w` (expanding vertically).
|
||||
- `w h` - works like a "text box." If `h` is non-zero and `h` <= `fontSize` (implying it should be a single line of text), text that goes beyond `w` will be truncated with an elipses (...).
|
||||
* `text` - type: STRING.
|
||||
* `color` - type: COLOR.
|
||||
* `fontPath` - type: PATH.
|
||||
|
|
|
@ -17,7 +17,8 @@ std::map< std::string, std::map<std::string, ThemeData::ElementPropertyType> > T
|
|||
("maxSize", NORMALIZED_PAIR)
|
||||
("origin", NORMALIZED_PAIR)
|
||||
("path", PATH)
|
||||
("tile", BOOLEAN))
|
||||
("tile", BOOLEAN)
|
||||
("color", COLOR))
|
||||
("text", boost::assign::map_list_of
|
||||
("pos", NORMALIZED_PAIR)
|
||||
("size", NORMALIZED_PAIR)
|
||||
|
|
|
@ -279,4 +279,7 @@ void ImageComponent::applyTheme(const std::shared_ptr<ThemeData>& theme, const s
|
|||
bool tile = (elem->has("tile") && elem->get<bool>("tile"));
|
||||
setImage(elem->get<std::string>("path"), tile);
|
||||
}
|
||||
|
||||
if(properties & COLOR && elem->has("color"))
|
||||
setColorShift(elem->get<unsigned int>("color"));
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ void TextComponent::onTextChanged()
|
|||
if(!wrap && mSize.x() && mText.size() && size.x() > mSize.x())
|
||||
{
|
||||
// abbreviate text
|
||||
const std::string abbrev = "..";
|
||||
const std::string abbrev = "...";
|
||||
Eigen::Vector2f abbrevSize = f->sizeText(abbrev);
|
||||
|
||||
std::string text = mText;
|
||||
|
|
Loading…
Reference in a new issue