mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Made the text element 'defaultValue' property usable with metadata types systemName, systemFullname, sourceSystemName and sourceSystemFullname
This commit is contained in:
parent
0b33884baa
commit
24c3817aaa
|
@ -999,7 +999,7 @@ void GamelistView::updateView(const CursorState& state)
|
|||
file->getPath() == file->getSystem()->getName()) &&
|
||||
(metadata == "systemName" || metadata == "systemFullname" ||
|
||||
metadata == "sourceSystemName" || metadata == "sourceSystemFullname")) {
|
||||
text->setValue("");
|
||||
text->setValue(text->getDefaultValue());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -691,7 +691,10 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
mThemeMetadata = type;
|
||||
if (elem->has("defaultValue")) {
|
||||
if (mThemeMetadata == "developer" || mThemeMetadata == "publisher" ||
|
||||
mThemeMetadata == "genre" || mThemeMetadata == "players") {
|
||||
mThemeMetadata == "genre" || mThemeMetadata == "players" ||
|
||||
mThemeMetadata == "systemName" || mThemeMetadata == "systemFullname" ||
|
||||
mThemeMetadata == "sourceSystemName" ||
|
||||
mThemeMetadata == "sourceSystemFullname") {
|
||||
const std::string& defaultValue {elem->get<std::string>("defaultValue")};
|
||||
if (defaultValue == ":space:")
|
||||
mDefaultValue = " ";
|
||||
|
|
|
@ -62,6 +62,8 @@ public:
|
|||
std::string getHiddenValue() const override { return mHiddenText; }
|
||||
void setHiddenValue(const std::string& value) override { setHiddenText(value); }
|
||||
|
||||
const std::string getDefaultValue() const { return mDefaultValue; }
|
||||
|
||||
float const getOpacity() const override
|
||||
{
|
||||
return static_cast<float>((mColor & 0x000000FF) / 255.0f);
|
||||
|
|
Loading…
Reference in a new issue